How can I get data from evaluating a function, say y=x^2+5 and put it in table?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Shreen El-Sapa
am 23 Sep. 2021
Kommentiert: the cyclist
am 23 Sep. 2021
How can I get data from evaluating a function, say y=x^2+5 for x=0.1 to 0.9 for 50 points in between and put it in table?
0 Kommentare
Akzeptierte Antwort
the cyclist
am 23 Sep. 2021
x = linspace(0.1,0.9,50);
y = x.^2+5;
tbl = table(y.');
3 Kommentare
the cyclist
am 23 Sep. 2021
The semicolon at the end of a line of MATLAB code suppresses the output. So just leave the semicolon off of any line you want displayed to the command window.
x = linspace(0.1,0.9,50)
y = x.^2+5
tbl = table(y.')
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Logical 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!