specify Simulink block parameters from Excel cells
Ältere Kommentare anzeigen
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.
Akzeptierte Antwort
Weitere Antworten (1)
Mat Nub
am 18 Mär. 2014
0 Stimmen
3 Kommentare
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
am 18 Mär. 2014
Srinivas
am 18 Mär. 2014
check the updated script
Kategorien
Mehr zu Data Import from MATLAB finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!