find me a rational approximation of padé for the function sin(2x-3) on the interval [-2,2] for m=n=5 in matlab

To find a rational approximation of Padé for the function sin(2x-3) on the interval [-2,2] with m=n=5 in MATLAB, you can follow these steps:

  1. Define the function in MATLAB:
main.m
f = @(x) sin(2*x-3);
21 chars
2 lines
  1. Compute the Taylor series expansion of the function using the taylor function in MATLAB:
main.m
syms x;
taylor_expansion = taylor(f(x), x);
44 chars
3 lines
  1. Use the pade function in MATLAB to find the rational approximation of Padé for the Taylor series expansion:
main.m
[m,n] = deal(5);
pade_approximation = pade(taylor_expansion, m, n);
68 chars
3 lines

The pade_approximation will give you the rational approximation of Padé for the function sin(2x-3) on the interval [-2,2] with m=n=5.

Note that the pade function requires the Symbolic Math Toolbox in MATLAB.

gistlibby LogSnag