I'm seeking advice on manipulating how Matlab is displaying numbers.

1 view (last 30 days)
Hello.
While designing a circuit with a Boost/Inverting converter(TPS65131) I wanted to explore all the possible alternatives for the resistive feedback voltage divider, it's just like any adjustable regulator where R1 goes from Vout to the feedback pin(FB) and then R2 goes from FB to GND. R2 is recommended to be below 200kohm so I made a array with
R2 = (10000:10000:200000)';
I don't want to bore you with all the details but I generated another array with the values for R1 that would correspond with a 6V output(which is my target), but I would like to get the numbers to represent Ohm's and not having to look at them like this:
>> R1
R1 =
0.394641384995878
0.789282769991756
1.183924154987634
1.578565539983512
1.973206924979390
2.367848309975268
2.762489694971146
3.157131079967023
3.551772464962901
3.946413849958780
4.341055234954657
4.735696619950535
5.130338004946413
5.524979389942291
5.919620774938169
6.314262159934047
6.708903544929925
7.103544929925802
7.498186314921680
7.892827699917559
for example: 3.946413849958780 is 394641.3849958780Ohms It may seem as a little problem but I have a rather serious case of ADD and to convert those numbers in my head is an awful task to do. I have searched for solutions but found none, I would like to convert the numbers as follows, lets use 3.946413849958780 again, I would like Matlab to present that as 394641.38 which would be a number of Ohm's
Do you know how to accomplish that?
Regards

Answers (1)

Walter Roberson
Walter Roberson on 10 Jun 2016
fprintf('%gOhms\n', R1*10^5)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!