Borrar filtros
Borrar filtros

Error with taylor series expansion

1 visualización (últimos 30 días)
Giorgio
Giorgio el 15 de Mzo. de 2017
Respondida: Walter Roberson el 10 de En. de 2019
Hi,
I was trying to compute the Taylor series approximation of a function as follows:
clc
clearvars
syms Theta(t) Phi(t) r
x = r/ sqrt(1 + tan(Theta)^2 + tan(Phi)^2)
xt = taylor(x, [Theta(t) Phi(t)])
This gives me the following error
Error using sym/taylor (line 99)
The value of 'x' is invalid. It must satisfy the function: @(x)isvector(x)&&isAllVars(x).
However this works removing the dependency of Theta and Phi from t as follows
syms Theta Phi r
Any idea?
Thanks
  1 comentario
LU kelon
LU kelon el 10 de En. de 2019
Have you solved this problem?I have trouble too

Iniciar sesión para comentar.

Respuestas (1)

Walter Roberson
Walter Roberson el 10 de En. de 2019
The second input to taylor must evaluate to a scalar symbolic variable . You cannot taylor with respect to two items at the same time and you xannot taylor with respect to a function .

Categorías

Más información sobre Mathematics en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by