Skip to Main Content Skip to Search
Login
File Exchange
MATLAB Newsgroup
Link Exchange
  Blogs  
 Contest 
MathWorks.com

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: Re: 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: Re: 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

Add a New Tag:

Separated by commas
Ex.: root locus, bode

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.

rssFeed for this Thread

envelope graphic E-mail this page to a colleague

Public Submission Policy
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.
Related Topics