Using a programmed struct name as function argument or programming pressing "enter" in the command window
Show older comments
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 Comment
Walter Roberson
on 9 Mar 2018
Accepted Answer
More Answers (0)
Categories
Find more on Structures in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!