Zaki Mohzani
Zaki Mohzani

Reputation: 297

MATLAB To File block eval capability

Simulink's To File block does not have the ability to evaluate a workspace variable to specify the filename parameter. How can I have the block take a variable as the filename parameter so I do not have to input/adjust it manually?

parameters

Upvotes: 1

Views: 173

Answers (1)

Phil Goddard
Phil Goddard

Reputation: 10772

You've really got 2 choices:

  1. If you're doing things programmatically then you could use set_param to put a different file name into the appropriate dialog each time you need to change it.

  2. You can put a Mask on top of the To File block. This will allow you to specify a variable in the mask, and its value would get passed down to the actual block.

Upvotes: 1

Related Questions