Simulink block from workspace
조회 수: 30(최근 30일)
I am new to matlab. I have some problems when I use the simulink block 'from workspace'.First, I opened a file in the command window.the first column of the file is time information and the second column is the signal value. Let say the name displayed on the workspace for the file is V1. Then,I placed the block 'from workspace' in simulink. I put V1 for the block parameter, 'Data:'. It pop up an error message 'invalid matrix format'. May I know what should I change to be able to get the information from the workspace?
Fangjun Jiang 2011년 11월 8일
What file are you open, .mat or .txt or something else?
In Command Window, do the following,
Then drag a "From Workspace" block to an empty model, drag a scope, connect it and run the simulation. Do you see a sine curve in the scope?
Guy Rouleau 2011년 11월 9일
편집: John Kelly 2015년 2월 27일
I recommend going through the "Importing Signal Data in Simulink" section of the doc:
Depending on your task, the table "Guidelines for Specifying Time and Signal Values for Imported Data" will help you implementing the most appropriate method.