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:
Delete a row from an array

Subject: Delete a row from an array

From: pete111

Date: 11 Feb, 2009 07:12:45

Message: 1 of 2

Currently i have this array:
1 4
3 5
4 5
2 4
5 10
5 11
9 8
10 9
11 2
how do i delete away the 4th row.
For example:
can it produce:
1 4
3 5
4 5
5 10
5 11
9 8
10 9
11 2

c that the 4th row is deleted and the 5th row moves up and replace it's position.

Hope you can help.

Many thanks.

Subject: Delete a row from an array

From: Johannes Huth

Date: 11 Feb, 2009 07:38:02

Message: 2 of 2

pete111 <kelvinwongtk@hotmail.com> wrote in message <31679365.1234336396428.JavaMail.jakarta@nitrogen.mathforum.org>...
> Currently i have this array:
> 1 4
> 3 5
> 4 5
> 2 4
> 5 10
> 5 11
> 9 8
> 10 9
> 11 2
> how do i delete away the 4th row.
> For example:
> can it produce:
> 1 4
> 3 5
> 4 5
> 5 10
> 5 11
> 9 8
> 10 9
> 11 2
>
> c that the 4th row is deleted and the 5th row moves up and replace it's position.
>
> Hope you can help.
>
> Many thanks.

% Delete fifth row in array A:
A(5,:) = [];
(or something like that)

Regards
joh

Tags for this Thread

No tags are associated with 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