specify Simulink block parameters from Excel cells
古いコメントを表示
I have a Simulink model containing over 300 unit delay blocks. So manually entering sample times is arduous process (copy/paste does not help as sample time differ from block to block). Is there any way for blocks to call sample times from a xls spreadsheet? If not directly from xls could this be done at least from Matlab workspace?
My thinking is to map the blocks in the model as cells in xls and then whatever changes happen in xls model will pickup and put in appropriate block.
採用された回答
その他の回答 (1 件)
Mat Nub
2014 年 3 月 18 日
0 投票
3 件のコメント
Supposing you have an excel sheet like this with two columns
a 1; b 2; c 3
[num,text] = xlsread('Book1.xlsx');
for ind = 1 : numel(num)
assignin('base',text{ind},num(ind))
end
this script will declare them in the base work space. HTH
Mat Nub
2014 年 3 月 18 日
Srinivas
2014 年 3 月 18 日
check the updated script
カテゴリ
ヘルプ センター および File Exchange で Data Import from MATLAB についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!