PLOT COMMAND USING string arguments

1 次查看(过去 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?

采纳的回答

Kye Taylor
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 CenterFile Exchange 中查找有关 Annotations 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by