need helpin solving this.
12 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
create a vector X with the elements,
add up the element of the version of this vector that has 100 elements.
thanks for the help.
n= 1:100
Xn= ((-1).^n+1)/(2*n-1)
Xn =
0.0076is this correct?
Antworten (3)
Sg dg
am 2 Jan. 2013
2 Kommentare
Image Analyst
am 2 Jan. 2013
Bearbeitet: Image Analyst
am 2 Jan. 2013
You go first. You can do this in two lines of MATLAB code. What were they and what were your "current answers"? Then we can tell you if you were correct.
Roger Stafford
am 2 Jan. 2013
As you near the end of your one hundred terms your sum ought to be oscillating roughly equal distances on either side of pi/4. Does that help?
Sg dg
am 2 Jan. 2013
3 Kommentare
Walter Roberson
am 2 Jan. 2013
The "/" operator is for matrix division. You want ./ which is element-by-element division.
Image Analyst
am 2 Jan. 2013
Nope. n is a vector so you need ./ rather than /.
Siehe auch
Kategorien
Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!