i want to write a code where equation is y=x*x. if y=100 what is the value of x?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
rakesh kumar
le 18 Sep 2020
Commenté : rakesh kumar
le 18 Sep 2020
i have written
z=100;
for x=1:1:20
y=x*x
if y==z
fprintf(x)
end
end
0 commentaires
Réponse acceptée
Stephen23
le 18 Sep 2020
Modifié(e) : Stephen23
le 18 Sep 2020
>> f = @(x) x.^2 - 100;
>> x = fzero(f,pi)
x = 10
Plus de réponses (1)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!