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:
Sum within a sum

Subject: Sum within a sum

From: Dean

Date: 3 Nov, 2010 00:00:06

Message: 1 of 2

Hi,

I have a 7x5 symbolic matrix called V (vnj) and a 1x5 symbolic vector called X (xj). I wish to evaluate the combined sum of multiplying each column j of V with element j of X, or in other words:

sum(j=1 to 5){sum(n=1 to 7)[vnj*xj]}

Is there a way to do this without using loops?

Thanks,
Dean

Subject: Sum within a sum

From: Torsten Hennig

Date: 3 Nov, 2010 07:45:31

Message: 2 of 2

> Hi,
>
> I have a 7x5 symbolic matrix called V (vnj) and a 1x5
> symbolic vector called X (xj). I wish to evaluate the
> combined sum of multiplying each column j of V with
> element j of X, or in other words:
>
> sum(j=1 to 5){sum(n=1 to 7)[vnj*xj]}
>
> Is there a way to do this without using loops?
>
> Thanks,
> Dean

s = sum(V*x') ?

Best wishes
Torsten.

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