Problem 52552. Undocumented MATLAB tricks No. 1 - Save a function-returned struct
Often we face the case when we want to save a function-returned struct to a mat file with each of its field as individual variables.
For example, the function returns a struct of 3 fields: a=1,b=2,c=3. Then you should save a file with 3 variables: a=1,b=2,c=3.
This problem is easy to just solve, but could be difficult to find the best solution of size 13! You may need some undocumented tricks.
Solution Stats
Solution Comments
Show commentsProblem Recent Solvers5
Suggested Problems
-
Find all elements less than 0 or greater than 10 and replace them with NaN
15595 Solvers
-
Project Euler: Problem 9, Pythagorean numbers
1292 Solvers
-
Flag largest magnitude swings as they occur
680 Solvers
-
621 Solvers
-
Possible Outcomes of American Roulette
119 Solvers
More from this Author12
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!