Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Help with VPA, digits and precision in a variable ...

Subject: Help with VPA, digits and precision in a variable ...

From: Kamran

Date: 10 Mar, 2008 16:04:01

Message: 1 of 3

I have an ill conditioned 8th order polinomial, where ration
among the coefficients are giantic in some cases, therefore,
in order to be able to have correct results I need to
calculate the numbers until 50 or may be 60-70 digits, and
plot them. But when I use VPA it adjusts its digit as much
as you want but also it converts your variable to a sym
which is not able to plot (and which is my main aim). I
tried to convert it to double, so that it could plot, but
then it again reduced the digits of the number to defaults
format (if i use format long reduces to 15 and otherwise to
4). and this is not helping me. I need your help, is there
anything that you can suggest?

Best wishes,
Kamran

Subject: Help with VPA, digits and precision in a variable ...

From: carlos lopez

Date: 11 Mar, 2008 01:34:03

Message: 2 of 3

Hello Kamran:
> I have an ill conditioned 8th order polinomial, where ration
> among the coefficients are giantic in some cases
From your message it is unclear which one is your problem.
Let's assume for the moment that you are trying to find the
roots of the polynomial.
You can play around with your coefficients by performing
some change of variable, like
P(x)==>P(y), where y=a*x+b for some "suitable" constants a
and b.
The transformation might not be linear; in any case, the
"best" one depends heavily on your particular problem.
Why don't you post the coefficients, and the problem statement?
If you decide to go ahead with the current values, you might
want to check Ben Barrowes Multiple Precision toolbox. It is
suitable to deal with huge numbers as well as tiny ones
Regards
Carlos

Subject: Help with VPA, digits and precision in a variable ...

From: carlos lopez

Date: 11 Mar, 2008 01:37:03

Message: 3 of 3

More on this...

"Kamran " <turkogluk@engr.uconn.edu> wrote in message
<fr3m5h$ous$1@fred.mathworks.com>...
> I have an ill conditioned 8th order polinomial, where ration
> among the coefficients are giantic in some cases, therefore,
> in order to be able to have correct results I need to
> calculate the numbers until 50 or may be 60-70 digits, and
> plot them. But when I use VPA it adjusts its digit as much
> as you want but also it converts your variable to a sym
> which is not able to plot (and which is my main aim).
If your goal is to plot something, consider that the eye is
a limited tool. Why to bother with extremely accurate
results that you could not discern when plotted?
Again: you should explain a little bit more about your problem.
Regards
Carlos

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us