matlab
沐妖
这个作者很懒,什么都没留下…
展开
-
02基本操作与矩阵输入
基本操作Operators:+ - * /Result is computed,and displayer as ans 结果保存在ans中先乘除后加减,括号可以改变运算顺序geogle matlab + 查询内容 可以找到API 右上角help 运行 help + 查询内容matlab中variable不需要宣告,即不需要指出类型int还是double,variable n...原创 2019-08-20 15:53:03 · 406 阅读 · 0 评论 -
03结构化程式与自定函数
左上角new script新建for i = 1 : 10x = linspace(0,10,101);plot(x,sin(x + i));print(gcf,'-deps',strcat('plot',num2str(i),'.ps'));endlayout->command history 查看历史命令fx寻找方程 选中代码,右键注释,注释使用%,两个%是将...原创 2019-08-20 15:58:39 · 575 阅读 · 0 评论 -
04变量与档案存取
强制转化同c++s1 = 'h';uint(s1);%求s1的ASC2码s1 = 'Example';s2 = 'String';s3 = [s1 s2]; % ExampleStrings4 = [s1;s2]; % 错误指令,因为两个字符串长度不同s = 'abcdefa';'a' == s每个位置分别做逻辑运算s('a' == s) =...原创 2019-08-26 20:49:46 · 127 阅读 · 0 评论 -
05基础绘图
plot(x,y) vector pairs(x,y)plot(y) x = [1...n],n = length(y)example: plot(cos(0:pi/20:2*pi));plot(cos(0:pi/20:2*pi));plot(sin(0:pi/20:2*pi));matlab画图会进行覆盖,只显示最后一个图像hold onplot(cos(0:p...原创 2019-09-03 16:26:38 · 98 阅读 · 0 评论