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:
i want to declare a matrix of n*m size-------------------------how

Subject: i want to declare a matrix of n*m size-------------------------how

From: manish sahu

Date: 30 Apr, 2008 14:30:06

Message: 1 of 7

i want to declare a matrix of n*m size

Subject: i want to declare a matrix of n*m size-------------------------how

From: ImageAnalyst

Date: 30 Apr, 2008 14:40:38

Message: 2 of 7

On Apr 30, 10:30=A0am, manish sahu <manish.com...@gmail.com> wrote:
> i want to declare a matrix of n*m size

-------------------------------------------------------------------------
manish sahu:
Lots of ways to get various matrices created with different contents.
Look up zeros(), ones(), magic(), rand().
Regards,
ImageAnalyst

Subject: i want to declare a matrix of n*m size-------------------------how

From: Dave Robinson

Date: 30 Apr, 2008 14:44:05

Message: 3 of 7

manish sahu <manish.comp05@gmail.com> wrote in message
<d94b8e68-b0c6-4060-8f63-
7b11cb302685@2g2000hsn.googlegroups.com>...
> i want to declare a matrix of n*m size

myMatrix = zeros(n,m);

perhaps

Regards

Dave Robinson

Subject: i want to declare a matrix of n*m

From: CandyGirl

Date: 30 Apr, 2008 17:48:51

Message: 4 of 7

Hi,

You can define values for n and m, and declare it like:

a=randn(n,m)

or define n and m to be the dimensions of your matrix:

[n,m]=size(a)

hope that helped :)

Subject: i want to declare a matrix of n*m size-------------------------how

From: GH raisoni College

Date: 8 Mar, 2013 10:55:05

Message: 5 of 7

manish sahu <manish.comp05@gmail.com> wrote in message <d94b8e68-b0c6-4060-8f63-7b11cb302685@2g2000hsn.googlegroups.com>...
> i want to declare a matrix of n*m size
a=[a1 a2 a3.... n<no.of rows>;b1b2 b3 b4 b5 ..<no.of rows>; ...;m1 m2 ....mn]

Subject: i want to declare a matrix of n*m size-------------------------how

From: Nasser M. Abbasi

Date: 8 Mar, 2013 11:30:51

Message: 6 of 7

On 3/8/2013 4:55 AM, GH raisoni College wrote:
> manish sahu <manish.comp05@gmail.com> wrote in message <d94b8e68-b0c6-4060-8f63-7b11cb302685@2g2000hsn.googlegroups.com>...
>> i want to declare a matrix of n*m size
> a=[a1 a2 a3.... n<no.of rows>;b1b2 b3 b4 b5 ..<no.of rows>; ...;m1 m2 ....mn]
>

zeros(n,m)

Subject: i want to declare a matrix of n*m size-------------------------how

From: someone

Date: 8 Mar, 2013 17:35:09

Message: 7 of 7

"GH raisoni College" wrote in message <khcg29$raq$1@newscl01ah.mathworks.com>...
> manish sahu <manish.comp05@gmail.com> wrote in message <d94b8e68-b0c6-4060-8f63-7b11cb302685@2g2000hsn.googlegroups.com>...
> > i want to declare a matrix of n*m size
> a=[a1 a2 a3.... n<no.of rows>;b1b2 b3 b4 b5 ..<no.of rows>; ...;m1 m2 ....mn]

What made you decide to answer this question after almost 5 years?

Just curious!

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