Info
Cette question est clôturée. Rouvrir pour modifier ou répondre.
How can rectify this error Dimensions of matrices being concatenated are not consistent?
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Cette question est clôturée.
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!