现在的位置: 首页 > 综合 > 正文

MATLAB使用摘记

2014年03月18日 ⁄ 综合 ⁄ 共 311字 ⁄ 字号 评论关闭

% Reading the data from the file
Map_Data=read_data('data/10x10/10_10_track.txt',m,n);

Matlab中的多if判断,和VB比较像

if n < 0 % If n negative, display error message.
disp(
'Input must be positive');
elseif rem(n,2) == 0 % If n positive and even, divide by 2.
= n/2;
else
= (n+1)/2; % If n positive and odd, increment and divide.
end
【上篇】
【下篇】

抱歉!评论已关闭.