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
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 についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!