How can I import “Pulse-based” or “Frame-based” data into Simulink models?
I have two models and I would like to feed the output of one model, "SourceModel", to the input of the second model, "DestinationModel".
In "SourceModel", I have a "Linear FM Waveform" block with the "Output Signal Format" set to "Pulses". I break that complex output into the real and imaginary portions, save the real portion into a MAT file called "Model1Out.mat", and then use a "To File" block with the "Save format" as "Array", as shown below:
In my second model, "DestinationModel", I would like to import the data saved in "Model1Out.mat" with a "From File" block, but I keep getting the following error:
"Invalid workspace variable specified as workspace input in ‘DestinationModel/From File’. Time values must be non decreasing".
I have tried loading the variable into the workspace to ensure the time values of the frames (first row of the matrix) are always increasing, and they are. I see the same error when I load the data into the workspace and use a "From Workspace" block. How can I get around this error?I have two models and I would like to feed the output of one model, "SourceModel", to the input of the second model, "DestinationModel".
In "SourceModel", I have a "Linear FM Waveform" block with the "Output Signal Format" set to "Pulses". I break that complex output into the real and imaginary portions, save the real portion into a MAT file called "Model1Out.mat", and then use a "To File" block with the "Save format" as "Array", as shown below:
In my second model, "DestinationModel", I would like to import the data saved in "Model1Out.mat" with a "From File" block, but I keep getting the following error:
"Invalid workspace variable specified as workspace input in ‘DestinationModel/From File’. Time values must be non decreasing".
I have tried loading the variable into the workspace to ensure the time values of the frames (first row of the matrix) are always increasing, and they are. I see the same error when I load the data into the workspace and use a "From Workspace" block. How can I get around this error? I have two models and I would like to feed the output of one model, "SourceModel", to the input of the second model, "DestinationModel".
In "SourceModel", I have a "Linear FM Waveform" block with the "Output Signal Format" set to "Pulses". I break that complex output into the real and imaginary portions, save the real portion into a MAT file called "Model1Out.mat", and then use a "To File" block with the "Save format" as "Array", as shown below:
In my second model, "DestinationModel", I would like to import the data saved in "Model1Out.mat" with a "From File" block, but I keep getting the following error:
"Invalid workspace variable specified as workspace input in ‘DestinationModel/From File’. Time values must be non decreasing".
I have tried loading the variable into the workspace to ensure the time values of the frames (first row of the matrix) are always increasing, and they are. I see the same error when I load the data into the workspace and use a "From Workspace" block. How can I get around this error? frame-based, pulse-based, to, workspace, file, from, linear, fm, waveform MATLAB Answers — New Questions