i want to write a code where equation is y=x*x. if y=100 what is the value of x?
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
rakesh kumar
am 18 Sep. 2020
Kommentiert: rakesh kumar
am 18 Sep. 2020
i have written
z=100;
for x=1:1:20
y=x*x
if y==z
fprintf(x)
end
end
0 Kommentare
Akzeptierte Antwort
Stephen23
am 18 Sep. 2020
Bearbeitet: Stephen23
am 18 Sep. 2020
>> f = @(x) x.^2 - 100;
>> x = fzero(f,pi)
x = 10
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Loops and Conditional Statements 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!