Filter löschen
Filter löschen

Passing a filename as a matlab function input

2 Ansichten (letzte 30 Tage)
GLW
GLW am 5 Aug. 2013
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

Antworten (0)

Kategorien

Mehr zu Structures finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by