5 messages
Open this post in threaded view
|

 Hi! I am a newbee to Octave. I have a problem with the error message below. " error: deneme2: =: nonconformant arguments (op1 is 1x1, op2 is 1x0)   error: called from   deneme2 at line 77 column 33 " Error line command is " Right_connector(i+1,2) = u; " My full code is here, can you please help me? n=5 s=[2 0;1 1;1 3], b=[0 -1 0]; center_x=1; center_y=0; circle_count=(s(1,1)+s(1,2))/2 Right_connector=zeros(19,4); Left_connector=zeros(19,4); connector_index =1; %first segment for i=1:circle_count   radius=i;   start_left_circle(center_x,center_y,radius)   if (circle_count==1)     Right_connector(i,1) = connector_index;     Right_connector(i,2) = i;     Right_connector(i,3) = center_x;     Right_connector(i,4) = center_y+1;           Right_connector(i,1) = connector_index;     Right_connector(i,2) = i+1;     Right_connector(i,3) = center_x;     Right_connector(i,4) = center_y-1;         else     Right_connector(i,1) = connector_index;     Right_connector(i,2) = i;     Right_connector(i,3) = center_x;     Right_connector(i,4) = circle_count-i+1;         Right_connector((2*circle_count)-i+1,1) = connector_index;     Right_connector((2*circle_count)-i+1,2) = (2*circle_count)-i+1;     Right_connector((2*circle_count)-i+1,3) = center_x;     Right_connector((2*circle_count)-i+1,4) = i-circle_count-1;  endif end for i=1:n-2     if (b(i)==0)       if (s(i,1)>0)         for u=s(i,1):1           line(i+1,u+circle_count,i+3,circle_count)           Left_connector(i,1) = i;           Left_connector(i,2) = u;           Left_connector(i,3) = i+1;           Left_connector(i,4) = u+circle_count;                     Right_connector(i+1,1) = i;           Right_connector(i+1,2) = u;           Right_connector(i+1,3) = i+1;           Right_connector(i+1,4) = u+circle_count;               end       endif       if (s(i,2)>0)         for u=1:s(i,2)           line(i+1,-u-circle_count,i+3,-u-circle_count)           Left_connector(i,1) = i;           Left_connector(i,2) = u;           Left_connector(i,3) = i+1;           Left_connector(i,4) = -u-circle_count;                     Right_connector(i+1,1) = i;           Right_connector(i+1,2) = u;           Right_connector(i+1,3) = i+3;           Right_connector(i+1,4) = -u-circle_count;               end       endif             endif     if (b(i)<0)       circle_count=(s(i+1,1)+s(i+1,2))/2;       center_x=3*i;       for p=1:circle_count           radius=2*p;           left_circle(center_x,center_y,radius)           Right_connector(i+1,1) = i;           Right_connector(i+1,2) = u; <***************** error is here. line 77.            Right_connector(i+1,3) = -(3*i)+1;           Right_connector(i+1,4) = -p;                     Right_connector(i+1,1) = i;           Right_connector(i+1,2) = u;           Right_connector(i+1,3) = -(3*i)+1;           Right_connector(i+1,4) = -p;       end     end       if (b(i)>0)         circle_count=(s(i+1,1)+s(i+1,2))/2;       center_x=3*i;             for p=1:circle_count           radius=2*p;           right_circle(center_x,center_y,radius)           Right_connector(i+1,1) = i;           Right_connector(i+1,2) = u;           Right_connector(i+1,3) = (3*i)-11;           Right_connector(i+1,4) = -p;                     Right_connector(i+1,1) = i;           Right_connector(i+1,2) = u;           Right_connector(i+1,3) = (3*i)-1;           Right_connector(i+1,4) = -p;       end     endif  end
Open this post in threaded view
|

## Re: About "=: nonconformant arguments"

 On Wed, Jul 10, 2019 at 8:33 AM Aziz YÜCELEN <[hidden email]> wrote: Hi! I am a newbee to Octave. I have a problem with the error message below. " error: deneme2: =: nonconformant arguments (op1 is 1x1, op2 is 1x0)   error: called from   deneme2 at line 77 column 33 " Error line command is " Right_connector(i+1,2) = u; " My full code is here, can you please help me? n=5 s=[2 0;1 1;1 3], b=[0 -1 0]; center_x=1; center_y=0; circle_count=(s(1,1)+s(1,2))/2 Right_connector=zeros(19,4); Left_connector=zeros(19,4); connector_index =1; %first segment for i=1:circle_count   radius=i;   start_left_circle(center_x,center_y,radius)I can't run it because i don't have a   start_left_circle(center_x,center_y,radius)!!!    if (circle_count==1)     Right_connector(i,1) = connector_index;     Right_connector(i,2) = i;     Right_connector(i,3) = center_x;     Right_connector(i,4) = center_y+1;           Right_connector(i,1) = connector_index;     Right_connector(i,2) = i+1;     Right_connector(i,3) = center_x;     Right_connector(i,4) = center_y-1;         else     Right_connector(i,1) = connector_index;     Right_connector(i,2) = i;     Right_connector(i,3) = center_x;     Right_connector(i,4) = circle_count-i+1;         Right_connector((2*circle_count)-i+1,1) = connector_index;     Right_connector((2*circle_count)-i+1,2) = (2*circle_count)-i+1;     Right_connector((2*circle_count)-i+1,3) = center_x;     Right_connector((2*circle_count)-i+1,4) = i-circle_count-1;  endif end for i=1:n-2     if (b(i)==0)       if (s(i,1)>0)         for u=s(i,1):1           line(i+1,u+circle_count,i+3,circle_count)           Left_connector(i,1) = i;           Left_connector(i,2) = u;           Left_connector(i,3) = i+1;           Left_connector(i,4) = u+circle_count;                     Right_connector(i+1,1) = i;           Right_connector(i+1,2) = u;           Right_connector(i+1,3) = i+1;           Right_connector(i+1,4) = u+circle_count;               end       endif       if (s(i,2)>0)         for u=1:s(i,2)           line(i+1,-u-circle_count,i+3,-u-circle_count)           Left_connector(i,1) = i;           Left_connector(i,2) = u;           Left_connector(i,3) = i+1;           Left_connector(i,4) = -u-circle_count;                     Right_connector(i+1,1) = i;           Right_connector(i+1,2) = u;           Right_connector(i+1,3) = i+3;           Right_connector(i+1,4) = -u-circle_count;               end       endif             endif     if (b(i)<0)       circle_count=(s(i+1,1)+s(i+1,2))/2;       center_x=3*i;       for p=1:circle_count           radius=2*p;           left_circle(center_x,center_y,radius)           Right_connector(i+1,1) = i;           Right_connector(i+1,2) = u; <***************** error is here. line 77.            Right_connector(i+1,3) = -(3*i)+1;           Right_connector(i+1,4) = -p;                     Right_connector(i+1,1) = i;           Right_connector(i+1,2) = u;           Right_connector(i+1,3) = -(3*i)+1;           Right_connector(i+1,4) = -p;       end     end       if (b(i)>0)         circle_count=(s(i+1,1)+s(i+1,2))/2;       center_x=3*i;             for p=1:circle_count           radius=2*p;           right_circle(center_x,center_y,radius)           Right_connector(i+1,1) = i;           Right_connector(i+1,2) = u;           Right_connector(i+1,3) = (3*i)-11;           Right_connector(i+1,4) = -p;                     Right_connector(i+1,1) = i;           Right_connector(i+1,2) = u;           Right_connector(i+1,3) = (3*i)-1;           Right_connector(i+1,4) = -p;       end     endif  end -- DAS
Open this post in threaded view
|

## Ynt: About "=: nonconformant arguments"

Open this post in threaded view
|

## Re: About "=: nonconformant arguments"

Open this post in threaded view
|