Efficient way to impliment this expression
2 views (last 30 days)
Show older comments
I got the following equation :
Let me assume the following : size(N)=1x1,size(c)=1x1,size(R )=1x1. Thita,Cn,Ct,W have the same length, for example 100. The output should be one value. What i want to do is to impliment this equation for many posisions.So if we say for 50 positions then Thita,Cn,Ct,W will be matrixes of size 100x50 and the output of the equation will be of size 1x50. I found a way to do it using loops but it seems to be slow. Thank you.
4 Comments
Image Analyst
on 13 Sep 2014
Edited: Image Analyst
on 13 Sep 2014
What time domain? What is t or dt? The integral is over theta (angle), not time, as far as I can see. I can do hundreds of millions of for loop iterations in less than a second. Not sure why your code takes so long. Again, how long does it currently take? Have you tried any of the built in functions for integrating functions? Is this homework?
Answers (0)
See Also
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!