Need help using from file block

Hi,
I am trying to run a model that uses an excel file i've created as the DE inputs to my system. I had no problem reading the excel file into matlab and transposing it into the matrix form that the block wants. My excel file uses hourly data points, so I have the times set to 3600 intervals (time 1 is zero, time 2 is 3600, time 3 is 7200, etc..). I have my "from workspace block going into a demux and just to test it quickly, have one output of the demux and a time signal going into an xy graph. When I look at the output of the graph, it is not updating any values from my workspace matrix and it just keeps the value of the first element. I have ysed simulink and matlab for a systems course before but I am not the best at it. Am i correct in using a demux, or is there a better way to do this? Any help is greatly appreciated!!
Thanks,
Chris

답변 (1개)

Fangjun Jiang
Fangjun Jiang 2011년 9월 11일

0 개 추천

Your probably didn't set the parameter for the "From Workspace" block correctly. Click 'Help' at the dialog window will lead you to the help page for this block. In a nutshell, you need to specify your data as: [TimeVector;ValueVector]. For example, [ 1 2 3 4;5 6 7 8] means the signal value is 5 at t=1s, 6 at t=2s, 7 at t=3s, etc.

카테고리

도움말 센터 및 File Exchange에서 Configure and View Diagnostics에 대해 자세히 알아보기

제품

질문:

2011년 9월 10일

Community Treasure Hunt

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

Start Hunting!

Translated by