Load real number, not integer
2 ビュー (過去 30 日間)
古いコメントを表示
Hi,
why is not possible to load real number? For example "3.14"???
It works only with integer.
UserData.matrix(1,1)=num2cell(sym(char(strcat('_',get(handles.a,'String'),char(sym(UserData.matrix{1,1}))))));
Can you help me?
3 件のコメント
Jan
2013 年 7 月 9 日
The question is still not clear. Why do you add a leading underscore? Why do you make the expression symbolic? You can save informations to a folder, but to a file only. But even then it is not clear, how the extraction of the cell element UserData.matrix{1,1} is related to a loading.
So I try to guess a solution, but thuis does not match to your posted code in any way.
採用された回答
Jan
2013 年 7 月 9 日
From the text of your question, I'd extect this could be a solution:
UserData.matrix{1,1} = sscanf(get(handles.a, 'String'), '%g');
5 件のコメント
Jan
2013 年 7 月 9 日
I cannot imagine what the conversions in these two lines should do:
UserData.matrix{1,1}=sscanf(strcat('||',get(handles.a, 'String'), ...
char((UserData.matrix{1,1}))), '%s');
vysledok(i,j)=cellstr(char(UserData.matrix{i,j}));
I have the strong impression that this can be done much more direct, but when it works as expected, who cares.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Entering Commands についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!