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?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Signal Import and Export 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!