Plotting graph using M-file.
显示 更早的评论
I want to plot graph of x Vs y. So when i do below steps its showing me error as Too many input arguments. So please let me know if you have any idea about this.
for i = 1:10:100
y=i+2;
t=y^2+4;
x(i) = (2*t-1);
k(i)=y+1;
end
plot (x(i),y(i))
I
4 个评论
Walter Roberson
2013-3-1
Which line is showing the problem?
Have you tried having no space after 'plot' ?
Shantanu K
2013-3-1
编辑:Shantanu K
2013-3-1
kash
2013-3-1
the reason i sthe value x has more values than y ,y has single value,use plot inside loop
Shantanu K
2013-3-1
采纳的回答
更多回答(1 个)
ChristianW
2013-3-1
k = 0;
for m = 1:10:100
k = k+1;
y(k)=m+2;
t=y(k)^2+4;
x(k) = (2*t-1);
end
plot(x,y)
3 个评论
Shantanu K
2013-3-1
ChristianW
2013-3-1
Copy/Paste it to a new m-file, save and run it.
kash
2013-3-1
It works fine in my system,datas are plotted
类别
在 帮助中心 和 File Exchange 中查找有关 2-D and 3-D Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!