作业帮 > 综合 > 作业

这个matlab的M文件为何无法绘制?

来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/05/24 05:42:25
这个matlab的M文件为何无法绘制?
close all clc clear t=[0:pi/25:8*pi]; y=sin(t); plot(t,y,'b:*'); 错误显示? Attempt to execute SCRIPT plot as a function. Error in ==> plot at 6 plot(t,y,'b:*');
还有我在命令窗口输入文件名为何也不行?
>> work.m
? The function, script, or class work
cannot be indexed using {} or . indexing.
或者
>> zsqf1.m
? The function, script, or class zsqf1
cannot be indexed using {} or . indexing.
没什么问题的,你再吧我的代码复制,运行一遍看看:clear all;clc;
t=[0:pi/25:8*pi]; 
y=sin(t); 
plot(t,y,'b:*');