필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

How can rectify this error Dimensions of matrices being concatenated are not consistent?

조회 수: 1 (최근 30일)
In parallel computing toolbox, I have included two workers(moving and avoidance).
spmd
first_run = true;
for i=1:2
if labindex == 1
if first_run
a=[1;1;1];
b=[2;2;2];
c=[0;0;3];
movingval = moving( a,b,c)
xmov=movingval(1,:)
ymov=movingval(2,:);
altmov=movingval(3,:);
first_run = false;
else
[A1,A2,A3]= labReceive()
end
else
[B,B1,B2 ]= avoidance(1);
xpos=B(1,:);
ypos=B(2,:);
alt=B(3,:);
labSend([B,B1,B2], 1);
end
end
end
I need that avoidance function output arguments, each arguments getting from that function is of different size. So that only im receiving this "Dimensions of matrices being concatenated are not consistent" error. How can i get that values?If my question is not clear apologize me!
function moving= moving(input1,input2,input3)
movingsize=[3 1500];
end
function [positionsize,coordinatessize,waypointsize]= avoidance(input2)
positionsize = [3 1500] %this variable is assigned with 3cross 1500 values
coordinatessize=[3 4] %this variable is assigned with 3cross 4 values
waypointsize=[1]
end
Is there any possibility to get the output even though they are of different size?Kindly give answers.Thanks in Advance!

답변 (0개)

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by