Function of many input arguments returns only one value
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Beaya
am 27 Okt. 2013
Bearbeitet: Azzi Abdelmalek
am 27 Okt. 2013
I have this function:
n = [0 :1: 40], x = 1.0,
v = ((sin(x + 2.^-n) + cos(3*x + 2.^-n)) - (sin(x) + cos(3*x)))/(2.^-n)
It only displays the result for the first value of n and I would like to get the results for all n from 0 to 40. How do I do this? I tried to modify this in many ways but nothing seems to work...
0 Kommentare
Akzeptierte Antwort
Azzi Abdelmalek
am 27 Okt. 2013
Bearbeitet: Azzi Abdelmalek
am 27 Okt. 2013
You missed ./
n = [0 :1: 40], x = 1.0,
v = sin(x + 2.^-n) + cos(3*x + 2.^-n) -(sin(x) + cos(3*x))./(2.^-n)
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Whos 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!