Matlab code for fractions
91 次查看(过去 30 天)
显示 更早的评论
How would I write 1.5/s as a num[ ] den[ ] code in matlab?
0 个评论
采纳的回答
John D'Errico
2020-9-27
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)
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Number Theory 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!