How do I changing file name in a "To File" block in Simulink from matlab command window?
Show older comments
Hi, Is there a way that i can change the file name in a "To File" block in Simulink from Matlab?
To change a variable in a "Constant" block the following line works.
set_param('model/Constant1','Value','5')
However changing the file name in a "To File" block using the same approach results in an error: "Invalid Simulink object specifier"
The input I have used is:
set_param('model/To File','FileName','test.mat')
Any solutions to this problem would be appreciated, as well as more efficient alternatives to use.
I'm running Matlab R2013b.
Accepted Answer
More Answers (0)
Categories
Find more on Simulink in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!