Using a programmed struct name as function argument or programming pressing "enter" in the command window
古いコメントを表示
I am trying to use a struct as an argument for my function:
[Output] = Function(InputString);
I have programmed the form of the "InputString", using
InputString = ['SomeText(' num2str(SomeNumber) ').SomeText.m' month 'd' day 't' time];
which returns a character array. When copying and pasting the result of "InputString" into the command window and pressing enter, the desired field of the struct is correctly read. However, with the code above, MATLAB only using the text of "InputString" as an input and not the desired struct that it represents.
How do I program copying the result of "InputString" and entering it in the command window, or is there a nicer solution?
1 件のコメント
Walter Roberson
2018 年 3 月 9 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Structures についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!