While loop homework problem
Afficher commentaires plus anciens
For any number between -1 and 1, your program calculates and outputs the arccosine and arcsine of the number in both degrees and radians. (Example: if you enter 0, arccosine is either 90 degrees or π/2 radians, and 270 degrees or 3π/2 radians.) For your convenience, your answers can be between 0 and 180 degrees (π).
This is what I've been doing. I know its wrong...The thing is it has to be like beginner MATLAB level language. i=-1;
while i<=1
i=asin(i)
i=asind(i)
i=acos(i)
end n=-1
1 commentaire
William
le 11 Oct 2011
Bye the way it is bad to use "i" as variables in Matlab because it thinks "i" or "j" as the square root of -1 (Imaginary number)
Réponse acceptée
Plus de réponses (1)
William
le 11 Oct 2011
for ii = -1:0.001:1
asind(ii)
asin(ii)
acosd(ii)
acos(ii)
end
1 commentaire
Abdullah Tamimi
le 11 Oct 2011
Catégories
En savoir plus sur Loops and Conditional Statements dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!