Passing a filename as a matlab function input

2 次查看(过去 30 天)
I am developing a verification environment where I want to be able to capture with file I/O some text status messages for each different test that is run.
I have a Matlab function block that handles the file I/O, one of the inputs to this function is the output filename for each test that is run. This value is set as a workspace variable, which gets updated each time a new test is run.
In the 'edit data' field for the function, I have set the scope of the filename input to 'Parameter'.
when I compile the design, I get the following error: "Expression 'TestName' for initial value of data 'TestName' (#28) must evaluate to a numeric or logical."
Is it possible to pass a filename set as a workspace variable into a function this way?
Many thanks in advance

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Structures 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by