我是靠谱客的博主 过时帅哥,这篇文章主要介绍matlab条件循环实例,for循环——有趣例子,现在分享给大家,希望可以做个参考。

% Script file: timings.m

%

% Purpose:

% This program calculates the time required to

% calculate the squares of all integers from 1 to

% 10,000 in three different ways:

% 1. Using a for loop with an uninitialized output

% array.

% 2. Using a for loop with an preallocated output

% array.

% 3. Using vectors.

%

% Record of revisions:

% Date Programmer Description of change

% ==== ========== =====================

% 12/08/97 S. J. Chapman Original code

%

% Define variables:

% ii, jj Loop index

% average1 Average time for calculation 1

% average2 Average time for calculation 2

% average3 Average time for calculation 3

% maxco

最后

以上就是过时帅哥最近收集整理的关于matlab条件循环实例,for循环——有趣例子的全部内容,更多相关matlab条件循环实例内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(88)

评论列表共有 0 条评论

立即
投稿
返回
顶部