Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
numbers arrangement

Subject: numbers arrangement

From: ilyani

Date: 24 Sep, 2010 13:50:19

Message: 1 of 3

hi, I need a help to solve this matter.

let say, I have 70 numbers in a column which the first 35 as x axis and the next 35 is y axis. In the end, I want it to be arranged (xx,yy) where the arrangement of the set starting from left to the right for x axis and from bottom to up for y axis.

U= {1, 2, 3,.....70};
Ux={1, 2, ....35};
Uy = {36, 37, 38, ... 70};

final output:
Ux : point (1,1)= 1
      point (1,2) = 2
         .
         .
         .
      point (5,7) = 35

Uy : point (1,1)=36
      point (1,2)= 37
      point (1,3) = 38
         .
         .
         .
      point (5,7) = 70

thanks for your help.

Subject: numbers arrangement

From: Sean

Date: 24 Sep, 2010 14:10:22

Message: 2 of 3

"ilyani " <dyeyanie@yahoo.com> wrote in message <i7iaaq$580$1@fred.mathworks.com>...
> hi, I need a help to solve this matter.
>
> let say, I have 70 numbers in a column which the first 35 as x axis and the next 35 is y axis. In the end, I want it to be arranged (xx,yy) where the arrangement of the set starting from left to the right for x axis and from bottom to up for y axis.
>
> U= {1, 2, 3,.....70};
> Ux={1, 2, ....35};
> Uy = {36, 37, 38, ... 70};
>
> final output:
> Ux : point (1,1)= 1
> point (1,2) = 2
> .
> .
> .
> point (5,7) = 35
>
> Uy : point (1,1)=36
> point (1,2)= 37
> point (1,3) = 38
> .
> .
> .
> point (5,7) = 70
>
> thanks for your help.

Like this?
U = [1:70]

Ux = reshape(U(1:35),5,7);
Uy = reshape(U(36:end),5,7);

Subject: numbers arrangement

From: ilyani

Date: 24 Sep, 2010 15:12:04

Message: 3 of 3

"Sean " <sean.dewolski@nospamplease.umit.maine.edu> wrote in message <i7ibge$mpf$1@fred.mathworks.com>...
> "ilyani " <dyeyanie@yahoo.com> wrote in message <i7iaaq$580$1@fred.mathworks.com>...
> > hi, I need a help to solve this matter.
> >
> > let say, I have 70 numbers in a column which the first 35 as x axis and the next 35 is y axis. In the end, I want it to be arranged (xx,yy) where the arrangement of the set starting from left to the right for x axis and from bottom to up for y axis.
> >
> > U= {1, 2, 3,.....70};
> > Ux={1, 2, ....35};
> > Uy = {36, 37, 38, ... 70};
> >
> > final output:
> > Ux : point (1,1)= 1
> > point (1,2) = 2
> > .
> > .
> > .
> > point (5,7) = 35
> >
> > Uy : point (1,1)=36
> > point (1,2)= 37
> > point (1,3) = 38
> > .
> > .
> > .
> > point (5,7) = 70
> >
> > thanks for your help.
>
> Like this?
> U = [1:70]
>
> Ux = reshape(U(1:35),5,7);
> Uy = reshape(U(36:end),5,7);

many thnx ..

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us