PLOT COMMAND USING string arguments
4 次查看(过去 30 天)
显示 更早的评论
I have the following code if true
x = get(text1,'string');
y = get(text2,'string');
axes(plot1);
plot(x,y);
end
but I got and error :
ERROR using Plot invalid first data argument| | the string on text1 is -10:10 and the string in text2 is x.^2
What is wrong?
0 个评论
采纳的回答
Kye Taylor
2013-6-12
编辑:Kye Taylor
2013-6-12
Maybe try
x = eval(get(text1,'string'));
y = eval(get(text2,'string'));
axes(plot1);
plot(x,y);
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!