Hello, I recently tried using Matlab for my homework to solve some matrices but quickly gave up. Matlab was giving all my answers in exact fractions rather than decimal rounding, so my answers to my matrices were over 4 lines long.
For example, how would I get Matlab to only display this as a decimal? I have the following code:
>> syms Vin Rg s C0 Rg C1 Rd r0
>> -1870615141224609/1152921504606846976*Vin*Rg/(1/s/C0+Rg)/(1/s/C1+1/Rd+1/r0)
ans =
-1870615141224609/1152921504606846976*Vin*Rg/(1/s/C0+Rg)/(1/s/C1+1/Rd+1/r0)
I want Matlab to display the fraction "-1870615141224609/1152921504606846976" as a decimal (-.0016) so it looks cleaner. I can't figure out how to do this after searching the internet and using the help feature. If anyone could help it would be greatly appreciated, thanks.
For example, how would I get Matlab to only display this as a decimal? I have the following code:
>> syms Vin Rg s C0 Rg C1 Rd r0
>> -1870615141224609/1152921504606846976*Vin*Rg/(1/s/C0+Rg)/(1/s/C1+1/Rd+1/r0)
ans =
-1870615141224609/1152921504606846976*Vin*Rg/(1/s/C0+Rg)/(1/s/C1+1/Rd+1/r0)
I want Matlab to display the fraction "-1870615141224609/1152921504606846976" as a decimal (-.0016) so it looks cleaner. I can't figure out how to do this after searching the internet and using the help feature. If anyone could help it would be greatly appreciated, thanks.