Efficient way to impliment this expression

조회 수: 2 (최근 30일)
Dimitrios
Dimitrios 2014년 9월 13일
편집: Dimitrios 2014년 9월 16일
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
Image Analyst
Image Analyst 2014년 9월 13일
편집: Image Analyst 2014년 9월 13일
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?
Dimitrios
Dimitrios 2014년 9월 13일
U said it correct:There is not time domain in this equation .But later calculations for every timestep there will be this calculation, which i assume will make the simulation slow. This equation is used in procedure to calculate loads in vertical axis wind turbine. Its not for homework. I am just trying to impliment this simulation using OOP(begginer) and trying to do it as efficient as possible considering that OOP is kind of slower in computational time.Ttic toc gave 4-5 sec time which considering times series of wind of 1-hour will make it in my opinion really slow later.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by