Enter forum description here ...
0
Completed

How can I run FresnelS and FresnelC functions?

JinhakKim 8 years ago updated by Pavel Holoborodko 8 years ago 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
Under review

Nonequidistant FFT

didier clamond 9 years ago updated by Pavel Holoborodko 9 years ago 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
Answered

Integer matrix

keuguz 9 years ago updated by Pavel Holoborodko 9 years ago 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.

0
Answered

Is there a mp-version of Matlab's function 'eps' ?

Roland K 9 years ago updated by Denis Tkachenko 8 years ago 4
0
Completed

Error using pinv

Hector 9 years ago updated by Pavel Holoborodko 9 years ago 8

??? Error using ==> mp>mp.pinv at 2964

DGESSD failed with exit code = 4
Error in ==> LM_Rtc at 77
s=pinv(a)*b
0
Answered

Extremely slow interp1

m b 9 years ago updated by Pavel Holoborodko 9 years ago 4

Hi,

Could you please advise why interp1 with mp is so slow compared to original matlab interp1? belwo is the example I'm running. Thank you for your kind help

mohsen


% Grid length and useful vectors
N = 200;
kp = mp(linspace(1e-6,5,N))';
n = mp( ones(1,2)); nn = mp(ones(N,1));


% parameters & given values
gam = 2; beta = 0.96;
R = 1.05; w0 = 3.44;
prob = mp([0.9500, 0.0500; 0.6750, 0.3250]);


w = mp(sort( w0*( .995 + randn(N,1)/7.5 ) ));
W = [w, 0*nn];


% initialize
Cp = mp(R)*kp*n; k = Cp;


% convergence criterion
Cp_crit = 1;


% Interpolate until convergence
ii = 0; tic

while Cp_crit > 1e-3
Cp0 = Cp;
EMUp = (Cp.^(-mp(gam)))*prob';
C = (mp(beta*R)*EMUp).^(-1/mp(gam));
k = ( kp*n + C - W)/mp(R);

% Use the relation between C and k to ropose a new vector Cp corresponding to kp
for i=1:2
% Update the function by interpolation.
Cp(:,i) = interp1(k(:,i), C(:,i), kp,'linear','extrap');
end

Cp_crit = max(max(abs(Cp0-Cp)./(1+abs(Cp))));
ii = ii+ 1;
end
toc
disp(Cp_crit)


0
Fixed

Bug in relational operations

Michael_ 9 years ago updated by Pavel Holoborodko 9 years ago 3

Hi.

I think there is a bug in the relational operations "equal" and "unequal"


test(:,1)=(1:4)';

testmp=mp(test);


This works:

test==1
ans =
1
0
0
0
testmp==1
ans =
1
0
0
0

This doesn't

1==test
ans =
1
0
0
0
1==testmp
ans =
1


This has worked in previous versions though.

Best regards,

Michael

0
Answered

Larger numbers

Hector 9 years ago updated by Pavel Holoborodko 9 years ago 10

Pavel, there are larger numbers than 1e + 308 and less than 1e-318 ?

0
Completed

use save and load

Hector 9 years ago updated by Pavel Holoborodko 9 years ago 1

how to use the command save and load the data mp ?

more precisely as save sets of objects containing mp elements, then load them ?,

or such as saving array mp text and then load ?

0
Completed

sortrows use

Hector 9 years ago updated by Pavel Holoborodko 9 years ago 6

I have an object X of type 100 x 4 mp

and I want to order it with the command sortrows
the sguiente way:
X = sortRows (X, 4);
but shows error:
Error in ==> sortrows at 74
ndx = sortrowsc(x_sub, col);
Error in ==> A_Var_FijaMP at 9
X=sortrows(X,4));
A_Var_FijaMP.m being my program