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!