필터 지우기
필터 지우기

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

조회 수: 2 (최근 30일)
Rizwana
Rizwana 2015년 7월 2일
편집: Walter Roberson 2015년 7월 2일
??? 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.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by