PLOT COMMAND USING string arguments

5 ビュー (過去 30 日間)
IO2000
IO2000 2013 年 6 月 12 日
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);
  1 件のコメント
IO2000
IO2000 2013 年 6 月 12 日
thanks it works

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by