필터 지우기
필터 지우기

Error with taylor series expansion

조회 수: 1 (최근 30일)
Giorgio
Giorgio 2017년 3월 15일
답변: Walter Roberson 2019년 1월 10일
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
LU kelon
LU kelon 2019년 1월 10일
Have you solved this problem?I have trouble too

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2019년 1월 10일
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 .

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by