MATLAB Answers

Create an Array/a List of Position

5 views (last 30 days)
Lucas S
Lucas S on 27 Jun 2019
Answered: Adam on 27 Jun 2019
Hello ! I have this code where i search Position of input and output of a Model Reference Block:
portPos = get_param('Model Reference Name', 'PortConnectivity');
for element = portPos(:)'
A = element.Position;
%Append Position A to an array
end
And i would like to add every in/out put Position in an array.
The position is a 1x2 double like this :
145 75
145 135
145 195
145 255
145 315
And so i would like to have something like this :
Position_List = [145 75, 145 135, 145 195, 145 255, 145 315]

  0 Comments

Sign in to comment.

Answers (1)

Adam
Adam on 27 Jun 2019
Position_List = reshape( position', 1, [] );

  0 Comments

Sign in to comment.

Sign in to answer this question.


Translated by