You kept asking similar questions on this topic. You need to ask your question precisely and accurately. The key point for this question is that you need to mention that the error happened in "MATLAB Function" block in Simulink.
In MATLAB, removing one row is very simple.
>> A=rand(5,8);
A(1,:)=[];
size(A)
ans =
4 8
The first row has been removed.
In the "MATLAB Function" block in Simulink, because most variables (especially inputs and outputs) have fixed size (dimension), removing rows or columns like above will cause the error message in your title.
To avoid this, click "Edit Data" in the MATLAB Function block editor, select the variable on the left, on the right, specify the maximum size (for example, [11 1000]), check "Variable size". By this way, you have defined the varialbe as variable size data. Then you can remove rows or columns like above and change the size of the variable. But keep in mind, variable size data in Simulink is quite tricky. You might have other errors down the line.
2 Comments
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/709358-error-unable-to-delete-elements-from-this-array-because-dimension-1-has-fixed-size-1000#comment_1246063
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/709358-error-unable-to-delete-elements-from-this-array-because-dimension-1-has-fixed-size-1000#comment_1246063
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/709358-error-unable-to-delete-elements-from-this-array-because-dimension-1-has-fixed-size-1000#comment_1247253
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/709358-error-unable-to-delete-elements-from-this-array-because-dimension-1-has-fixed-size-1000#comment_1247253
Sign in to comment.