Hello guys,
hope anyone of you can help me to write the following Code:
g should be equal to the integer part of
So in the beginning of my Code i would like to define "n" as Input. Thereafter the Code runs and the ouput is R.
Would really appreciate your help! :)
Best Florian

댓글 수: 2

Star Strider
Star Strider 2015년 11월 28일
It seems straightforward, although it will likely involve some tedious typing and it looks like a couple nested loops.
Give it a go. If you have problems, post (and format) or attach your code (use the ‘paperclip’ icon and do both the ‘Choose file’ and ‘Attach file’ steps). We will help you to get it running. Comment it to explain what it is doing, and tell us the dimensions of your variables, and also attach them as data if possible (save them as a .mat file and attach it as well with the ‘paperclip’ icon) as a separate attachment.
Florian Fbr
Florian Fbr 2015년 11월 29일
I have no idea how to write this code as I am a total beginner.
If anyone can help me i would really appreciate this.

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

 채택된 답변

Walter Roberson
Walter Roberson 2015년 11월 29일

0 개 추천

g = floor(4*(n/100)^(2/9));
R = sum( arrayfun( @(h) sum(X(h+1:n).*e(h+1:n).*e(1:n-h).*Xprime(1:n-h) + X(1:n-h).*e(1:n-h).e(h+1:n).*Xprime(h+1:n)) / (1 + h/(g+1), 1:g) );
We do not have the information to know if X and Xprime are related.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

질문:

2015년 11월 28일

답변:

2015년 11월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by