Got Questions? Get Answers.
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:
Brain Freeze! Writing the vector a_1:a_n+1

Subject: Brain Freeze! Writing the vector a_1:a_n+1

From: theconster@gmail.com

Date: 15 May, 2009 05:18:22

Message: 1 of 3

Hi, I am having a major case of mind block, and at the moment am unable to remember how I go about making a vector [a_1 a_2 .... a_n a_n+1]

(as in subscripted coefficients)

If someone could remind me then I would most appreciate it.

Thanks!

Subject: Brain Freeze! Writing the vector a_1:a_n+1

From: theconster@gmail.com

Date: 15 May, 2009 06:19:22

Message: 2 of 3

sorry to bump, just this is really annoying me

Subject: Brain Freeze! Writing the vector a_1:a_n+1

From: Johnathan

Date: 15 May, 2009 07:26:02

Message: 3 of 3

"theconster@gmail.com" <theconster@gmail.com> wrote in message <23397523.105770.1242364733384.JavaMail.jakarta@nitrogen.mathforum.org>...
> Hi, I am having a major case of mind block, and at the moment am unable to remember how I go about making a vector [a_1 a_2 .... a_n a_n+1]
>
> (as in subscripted coefficients)
>
> If someone could remind me then I would most appreciate it.
>
> Thanks!

What do you mean subscripted coefficients?
You can access a vector with its index, A=[1,2,3] so A(2)=2
You can make a cell array of values

string='dog'
for i=1:3
A{i}=[string,'_',num2str(i)]
end
A= 'dog_1' 'dog_2' 'dog_3'
A{2}=dog_2

Maybe I should know what a subscripted array is, but maybe this is what you want.

--John

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