Matlab code for fractions
95 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Johnny McKenney
le 27 Sep 2020
Commenté : Star Strider
le 27 Sep 2020
How would I write 1.5/s as a num[ ] den[ ] code in matlab?
0 commentaires
Réponse acceptée
John D'Errico
le 27 Sep 2020
Confusing question.
Do you know the value of s?
s = 7
s =
7
>> 1.5/s
ans =
0.214285714285714
>> format rat
>> 1.5/s
ans =
3/14
Do you not know what is is, so you want to use s in a symbolic form?
syms s
1.5/s
ans =
3/(2*s)
Plus de réponses (1)
Star Strider
le 27 Sep 2020
2 commentaires
Star Strider
le 27 Sep 2020
My pleasure!
If my Answer helped you solve your problem, please Accept it!
.
Voir également
Catégories
En savoir plus sur Number Theory dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!