SIMULINK Action subsystem with 1D-lookup Table, which data is not always available
Afficher commentaires plus anciens
Hello everybody,
I have question regarding Simulink subsystems, look-up tables and size mismachtes:
In my model I have two subsystems, which are controlled via a if-block. So subsystem number one is activated, if I have one type of aggregat, subsystem two, if I have another aggregat. Inside each subsystems I use the interp1 command in a MatLab Function block.
My problem is, that if on type of aggreagt activates one subsystem, the input data for interp1 look-up-table in the second subsystem is X=0,Y=0. So I get the error message: "There should be at least two data points."
But if I try this:
if size(X,1)==1
X=[X X+1];
Y=[Y Y];
end
Data=interp1(X,Y,xi);
I get the error message "size mismatch (size[1x1]~=size[1x2]).
Anybody a idea or tipss how to solve this? Thanks!
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Subsystems dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!