Matlab 中t=pi*(0:100)/100;是什么意思?

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/10 18:08:46
Matlab 中t=pi*(0:100)/100;是什么意思?

Matlab 中t=pi*(0:100)/100;是什么意思?
Matlab 中t=pi*(0:100)/100;是什么意思?

Matlab 中t=pi*(0:100)/100;是什么意思?
这里只要知道MATLAB里冒号:和pi表示什么,其它的都是数学问题不用说了.
上式等效于
x=0:100; %x取0到100默认间隔是1的101个数;也可以写成x=0:1:100表示取0到100间隔是1的数.中间间隔根据自己需要定.
t=pi*x/100; %pi是圆周率π
定义一个数,后面加分号结束表示不显示这个数,不加分号,则这个数就像一楼那样全都显示出来.

t =
Columns 1 through 8
0 0.0314 0.0628 0.0942 0.1257 0.1571 0.1885 0.2199
Columns 9 through 16
0.2513 0.2827 0.3142 0.3456 0.3770 ...

全部展开

t =
Columns 1 through 8
0 0.0314 0.0628 0.0942 0.1257 0.1571 0.1885 0.2199
Columns 9 through 16
0.2513 0.2827 0.3142 0.3456 0.3770 0.4084 0.4398 0.4712
Columns 17 through 24
0.5027 0.5341 0.5655 0.5969 0.6283 0.6597 0.6912 0.7226
Columns 25 through 32
0.7540 0.7854 0.8168 0.8482 0.8796 0.9111 0.9425 0.9739
Columns 33 through 40
1.0053 1.0367 1.0681 1.0996 1.1310 1.1624 1.1938 1.2252
Columns 41 through 48
1.2566 1.2881 1.3195 1.3509 1.3823 1.4137 1.4451 1.4765
Columns 49 through 56
1.5080 1.5394 1.5708 1.6022 1.6336 1.6650 1.6965 1.7279
Columns 57 through 64
1.7593 1.7907 1.8221 1.8535 1.8850 1.9164 1.9478 1.9792
Columns 65 through 72
2.0106 2.0420 2.0735 2.1049 2.1363 2.1677 2.1991 2.2305
Columns 73 through 80
2.2619 2.2934 2.3248 2.3562 2.3876 2.4190 2.4504 2.4819
Columns 81 through 88
2.5133 2.5447 2.5761 2.6075 2.6389 2.6704 2.7018 2.7332
Columns 89 through 96
2.7646 2.7960 2.8274 2.8588 2.8903 2.9217 2.9531 2.9845
Columns 97 through 101
3.0159 3.0473 3.0788 3.1102 3.1416

收起