MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi
Learn moreOpportunities for recent engineering grads.
Apply TodayMATLAB Central > MATLAB Newsreader > Bogey 

Hi, 
I'm not sure it will help performance, but you could get rid of one of the loops with repmat. 
"b b" <bogey4@gmail.com> wrote in message <gdvjlp$kij$1@fred.mathworks.com>... 
Thanks Roger, that's exactly what I was looking for! Unfortunately, I missed one variable in the code I posted. I meant to write: 
"b b" <bogey4@gmail.com> wrote in message <gdvq28$482$1@fred.mathworks.com>... 
Brilliant! The first line ( tot = X*ksi*Y; ) gave me the correct answer. I'm glad to now know an elegant and straight forward solution to this. As for computational speed, it seems that the equation that you suggested is faster: 
Hi Roger et al., 
"b b" <bogey4@gmail.com> wrote in message <ge2dju$bjg$1@fred.mathworks.com>... 
Thanks Bruno, 
"b b" <bogey4@gmail.com> wrote in message <ge2lf8$dbb$1@fred.mathworks.com>... 
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.