Can anybody help me to convert the following MuPAD functions to MATLAB Symbolic Math?
//Peano Th and kernel
//pp - truncated power
pp:=(z,n)->piecewise([z>=0,z^n],[Otherwise,0]):
//PeanoKernel - compute Peano kernel given L, dex and var
PeanoKernel:=proc(L,d,t)
local K;
begin
K:=1/d!*eval(L(x->pp(x-t,d)));
return(K);
end_proc:
//PeanoCorr - Corollary to Peano Theorem
PeanoCorr:=proc(L,d)
local K;
begin
K:=L(x->x^(d+1));
K:=1/(d+1)!*factor(simplify(K))*(D@@(d+1))(f)(`ξ`);
return(K);
end_proc:
//PeanoKernel:=proc(L,d,t) //versiune veche
// local K,ff;
//begin
// ff:=x-->piecewise([x-t>=0,(x-t)^d],[Otherwise,0]);
// K:=1/d!*eval(L(x->ff(x)));
// return(K);
//end_proc:
//PeanoEstimation - Estimation based on Peano's theorem
PeanoEstimation:=proc(L,d,a,b)
local K;
begin
K:=PeanoKernel(L,d,t);
M[d+1]*int(abs(K),t=a..b);
end_proc:
The automatic conversion yields a lot of errors.

4 comentarios

darova
darova el 26 de Mzo. de 2020
I think faster be to write new code. DO you how original formulas?
Radu Trimbitas
Radu Trimbitas el 26 de Mzo. de 2020
I tried but I had a lot of errors.
If L is a linear and continuous functional, and L(f)=0 for each polynomial f of degree at most d
, where K is the Peano Kernel
, and is z for and 0 otherwise.
I intend to use these formulas to compute rests for various approximation formulas.
The code works fine in MuPAD, but Mathworks removed the MuPAD Notebook Interface in 2020 a prerelease.
darova
darova el 27 de Mzo. de 2020
What about this
syms t
K = 1/factorial(d)*L( (x-t)^d );
L = integral(K*f^(d+1),a,b)
Radu Trimbitas
Radu Trimbitas el 28 de Mzo. de 2020
f^(d+1) means the derivative of order (d+1) of f

Iniciar sesión para comentar.

Respuestas (1)

Cris LaPierre
Cris LaPierre el 28 de Mzo. de 2020

0 votos

Have you seen this page? It recommends trying the convertMuPADNotebook function. It also points to the resource page Convert MuPAD Notebooks to MATLAB Live Scripts.

Categorías

Más información sobre Symbolic Math Toolbox en Centro de ayuda y File Exchange.

Productos

Versión

R2019b

Preguntada:

el 25 de Mzo. de 2020

Respondida:

el 28 de Mzo. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by