Enter forum description here ...
0
Z odpowiedzią

Hi! is there any mp.Legendre version equivalent to the built in function in matlab ?

SomeOne 7 lat temu Ostatnio zmodyfikowane przez Pavel Holoborodko 7 lat temu 5
0
W trakcie analizy

Is there an mp version of bvp4c? Will there be?

Phil Hario 7 lat temu Ostatnio zmodyfikowane przez Pavel Holoborodko 5 lat temu 3
0
Naprawione

ORDEIG fails

Stefan Güttel 7 lat temu Ostatnio zmodyfikowane przez Pavel Holoborodko 7 lat temu 1

Hi Pavel,

I hope you are doing fine?! I'm running Advanpix Version 3.9.4 Build 10481 on Windows and ORDEIG crashes MATLAB 2015B with a "FatalException" on the following problem:


KK = [ mp('1.2856486930664507983834710103110410e+00'), mp('0.0000000000000000000000000000000000e+00') ;

mp('0.0000000000000000000000000000000000e+00'), mp('1.2856486930664507983834710103110410e+00') ];
HH = [ mp('1.4142135623730976590195496100932360e+02 - 1.4142135623730959537169837858527899e+02i'), mp('1.2325951644078309459558258832543535e-32 + 0.0000000000000000000000000000000000e+00i') ;
mp('0.0000000000000000000000000000000000e+00 + 0.0000000000000000000000000000000000e+00i'), mp('1.4142135623730976590195496100932360e+02 + 1.4142135623730959537169837858527899e+02i') ];

ee = ordeig(HH,KK);


When calling ordeig(double(HH),double(KK)), everything works fine. Please see below for my mp.Info output and the crash report.

Cheers, Stefan



>> mp.Info

-------------------------------------------------------------------------------------------------------------
Multiprecision Computing Toolbox, (c) 2008-2016 Advanpix LLC.
Version : 3.9.4 Build 10481
Platform: 64-bit (Win64)
Release : 2016-03-03

Licensed to: Stefan Güttel
Maintenance: 2016-08-31

Open Source Libraries Acknowledgements:
MPIR 2.7.0 C Library for Multiple Precision Integers and Rationals.
MPFR 3.2.0-dev C Library for Multiple-Precision Floating-point computations with correct Rounding.
MPC 1.1dev C Library for the Arithmetic of Complex numbers with arbitrary high precision.
MPFR C++ 3.6.3 C++ multi-precision floating point number class.
Eigen 3.2.90 C++ template library for linear algebra.
Nika 1.1.0 C++ template library for numerical mathematics.
APLA 1.5.0 C++ arbitrary-precision linear algebra library.
Boost 1.49.0 Free peer-reviewed portable C++ source libraries.
LAPACK 3.5.0 State of the art software library for numerical linear algebra.
KISS FFT 1.2.9 Simple and efficient mixed-radix Fast Fourier Transform library.
-------------------------------------------------------------------------------------------------------------



This error was detected while a MEX-file was running. If the MEX-file

is not an official MathWorks function, please examine its source code
for errors. Please consult the External Interfaces Guide for information
on debugging MEX-files.

If this problem is reproducible, please submit a Service Request via:

A technical support engineer might contact you with further information.

Thank you for your help.** This crash report has been saved to disk as C:\Users\Stefan\AppData\Local\Temp\matlab_crash_dump.10700-15 **


(I CAN SEND YOU THE CRASH DUMP IF NECESSARY.)


0
Z odpowiedzią

Missing accumarray()

sedenka 7 lat temu Ostatnio zmodyfikowane przez Pavel Holoborodko 7 lat temu 3

Hello,
I need to implement MATLAB built-in function accumarray(), which is not supported by the Advanpix toolbox (yet?). In order to use the same code for single/double/mp precision, I tried to overload accumarray by creating a new function in the mp class. Whenever I want to pass a vector of mp values to that function, it gets "messed up".


I have put this piece of code into the methods section of mp class:
function result = accumarray(subs, val, sz)
size(val)
val(1)
val(2)
keyboard
...
end


The code...
>> accumarray([1; 2; 2; 1; 1], mp([1;2;3;4;5]))
...returns...
ans =
5 1


ans =
1
2
3
4
5


Index exceeds matrix dimensions.


Error in mp/accumarray (line 5038)
val(2)


As you can see, the second argument has still its size (and numel) but all the content was somehow shrinked into the first element. Could you, please, help me with implementing of my own methods into the toolbox?


Best regards,
Vladimir

0
Naprawione

Bsxfun with empty input

sedenka 7 lat temu zaktualizowano 7 lat temu 2

Hello,
I think I have found bug/different behavior in bsxfun():
a = pi;
a(1) = [];
bsxfun(@plus, a, ones(4,1))
...returns...
ans =
Empty matrix: 4-by-0


but

a = mp('pi');
a(1) = [];
bsxfun(@plus, a, ones(4,1))
...returns...
Error using mp/subsref (line 990)
Index exceeds matrix dimensions.


Error in mpbsxfun (line 71)


Error in mp/bsxfun (line 1132)
[varargout{1:nargout}] = mpbsxfun(varargin{:});


I am running:
MATLAB Version: 8.5.0.197613 (R2015a)

Multiprecision Computing Toolbox, (c) 2008-2017 Advanpix LLC.
Version : 4.3.2 Build 12170
Platform: Win64
Release : 2017-01-16

Trial version. Valid until 2017-01-30

Best regards,
Vladimir

0
Ukończony

Error for boolean operation at certain precision

Michael_ 7 lat temu Ostatnio zmodyfikowane przez Pavel Holoborodko 7 lat temu 3

Hello Pavel.

I got the following problem:

mp.Digits(349);
array=mp('2')*mp('10')^mp('-4'):mp('2')*mp('10')^mp('-4'):mp('1');
array(1,100)==mp('0.02')

ans =
logical
1

mp.Digits(350);
array=mp('2')*mp('10')^mp('-4'):mp('2')*mp('10')^mp('-4'):mp('1');
array(1,100)==mp('0.02')

ans =
logical
0

mp.Digits(351);
array=mp('2')*mp('10')^mp('-4'):mp('2')*mp('10')^mp('-4'):mp('1');
array(1,100)==mp('0.02')
ans =
logical
1


This apperas quite randomly, deppending on the used precision. You can try for example mp.Digits(352) to mp.Digits(355).


Thank you for your help.

0
Z odpowiedzią

SVD behavior in mp different from Matlab when applied to negative scalar

Denis Tkachenko 8 lat temu zaktualizowano 8 lat temu 2

I have the following question:


In one of my examples I need to compute the Singular Value Decomposition (SVD) of a negative scalar, specifically -0.7276.


In double precision, Matlab returns:

>> [U S V]=svd(-0.7276)

U = -1
S = 0.7276
V =1


In MP, I obtain:


s=mp('-0,7276');


>> [U,S,V]=svd(s)


U = 1
S = -0.7276
V = 1


The definition of SVD states that the matrix S should have nonnegative diagonal entries. In the above example, the first two elements seem to be multiplied by -1 compared to Matlab output. While the product doesn't change, the unexpected negative sign of the singular value causes problems in subsequent code.


Is this a bug or is there an option to make it return the same output as Matlab's svd?


The 4.2.3.11967 release of the toolbox was used.

Thank you,

Denis

Odpowiedź
Pavel Holoborodko 8 lat temu

Dear Denis,

Thank you very much for the report!


Indeed, this is bug and it has been fixed in latest build.

Please download updated version: http://goo.gl/pMXV3


Thank you,

Pavel.

0
Ukończony

How can I run FresnelS and FresnelC functions?

JinhakKim 8 lat temu Ostatnio zmodyfikowane przez Pavel Holoborodko 8 lat temu 1

When I add the multiprecision computing toolbox and type FresnelS(1) in matlab command, I get the following error message.


Cannot find an exact (case-sensitive) match for 'FresnelS'

The closest match is: fresnels in C:\Program
Files\MATLAB\R2016a\toolbox\symbolic\symbolic\@double\fresnels.m


Also, when I type fresnels(mp(1)), I get


Undefined function 'fresnels' for input arguments of type 'mp'.


How can I solve this problem?

0
W trakcie analizy

Nonequidistant FFT

didier clamond 8 lat temu Ostatnio zmodyfikowane przez Pavel Holoborodko 8 lat temu 6

Dear Pavel,


It would be great to support the non-equidistant Fast Fourier Transform.

https://www-user.tu-chemnitz.de/~potts/nfft/


Regards,

Didier

0
Z odpowiedzią

Integer matrix

keuguz 8 lat temu Ostatnio zmodyfikowane przez Pavel Holoborodko 8 lat temu 1

I have matrices they are made of integers. Do I need to define mp even for integers? For example:


N=100;

A=(zeros(N+1,N+1));

for l=1:N;

for k=mod(l-1,2):3:l;

A(k+1,l+1)=3*l;

end

end


and


p=0:1:N;

kron(p',p);


and


I=ones(N+1,1);

II=(-1).^(0:N);

G=kron(I,II);


Integer is normally considered as infinite precision. I use these matrices in further calculation with non-integer matrices, therefore, results. But using mp.Digits(100) for example costs me a lot in here for no gain actually.