% 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条件循环实例内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复