Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.


dpb
Posts:
9,804
Registered:
6/7/07


Re: vector manipulation
Posted:
Feb 19, 2013 7:51 PM


On 2/19/2013 5:38 PM, Raymundo MarcosMartinez wrote: > "Elnaz " <ebsadeghian@gmail.com> wrote in message > <kftvaa$j37$1@newscl01ah.mathworks.com>... ...
>> I want to subtract all the elements of a vector from an scalar >> onebyone to get a scalar and I want to avoid looping. For example >> say I want to do 8[1 2] to get 812=5. How can I do that? >> ...
> I am sure there is a more elegant and general answer. In the meantime ... > > a = 8; > b = [1 2]; > x = a  b(1)  b(2); % > a(???)
doc sum % again... :)




