I can't get my function to work or print right
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Brendan
am 8 Nov. 2023
Beantwortet: Walter Roberson
am 8 Nov. 2023
x=(0:31);
y=(2.^x);
disp(y)
Im just trying to get a list of values from 2^0 to 2^31. I know the range is right but I guess theres something I don't understand about functions because the values are mostly below 1.
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 8 Nov. 2023
The values are not below 1: you have been fooled by the way the default output format
x=(0:31);
y=(2.^x);
disp(y)
format long g
disp(y)
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Dates and Time 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!