| MATLAB 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.
| Tag Activity for This Thread | ||
|---|---|---|
| Tag | Applied By | Date/Time |
| linear algebra | b b | 25 Oct, 2008 15:00:07 |
| avoiding loops | b b | 25 Oct, 2008 15:00:07 |
| optimization | b b | 25 Oct, 2008 13:12:37 |
| loop | b b | 25 Oct, 2008 13:12:37 |
| matrix multipli... | b b | 25 Oct, 2008 13:12:37 |
Contact us at files@mathworks.com
