Effacer les filtres
Effacer les filtres

Please help. How to solve this m-scripting error?

2 vues (au cours des 30 derniers jours)
Rizwana
Rizwana le 2 Juil 2015
??? Error using ==> add_block
Invalid destination block specification.
This is my script and creating a model to add block into it.
I am reading a '.xlsx' file;
sys = 'testModel';
new_system(sys)
open_system(sys)
filename = 'abc.xlsx';
[x,y]= xlsread(filename);
[row,col]= size(y); // [38,4]
i = 1: col // 1: 4
m= y(:,i); // y(:,1) reads 1st full column
n = m'; // arranging the column in vector matrix for ease
k = length(n) // 38
for 1 = 1: k // 1: 38
count = 0;
x = 30+count;
y = 30+count;
w = 30+count;
h = 30+count;
pos = [x y+h/4 x+w y+h*.75]
add_block('built-in/Inport',[sys n(k)],'Position',pos);
count = count+10;
end
iam getting this error:
??? Error using ==> add_block
Invalid destination block specification.

Réponses (0)

Catégories

En savoir plus sur Simulink dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by