matlab画图的问题,懂matlab的哥们进来看看啊~~

来源:百度知道 编辑:UC知道 时间:2024/06/24 06:48:01
我想画一个图像
>> x=-2*pi:0.05:2*pi;
y=asin(3+sin(x))-x;
fplot(x,y);
结果出来:
??? Error using ==> fcnchk
FUN must be a function, a valid string expression,
or an inline function object.

Error in ==> fplot at 66
fun = fcnchk(fun);
想问一下是怎么回事,如果想画出符合y=asin(3+sin(x))-x的图像该怎么办?
多谢多谢~啦

我不是哥们,但是也帮帮你:)

你的用法不对,应该这样
fplot('asin(3+sin(x))-x',-2*pi:0.05:2*pi)

或者这样
x=-2*pi:0.05:2*pi;
y=asin(3+sin(x))-x;
plot(x,y);

你那asin是什么呀?arcsin?

直接用plot函数就行