Error on a single numeric equation

조회 수: 4 (최근 30일)
Mark Montero
Mark Montero 2021년 12월 6일
편집: DrZoidberg 2021년 12월 6일
I keep getting error at defining f_1(t), is there any other way to input its equation to matlab?

답변 (2개)

Walter Roberson
Walter Roberson 2021년 12월 6일
heaviside not heavyside
heaviside will not convert that table of conditions into appropriate heaviside calls. You can write your code in terms of piecewise() and rewrite() 'heaviside'. But before doing that, use sympref to change Heavisideatorigin

DrZoidberg
DrZoidberg 2021년 12월 6일
편집: DrZoidberg 2021년 12월 6일
********************************
EDIT: I'm sorry my answer was not correct, please check the comment below:
  댓글 수: 1
Walter Roberson
Walter Roberson 2021년 12월 6일
This is not correct. You only need to syms the function form if you are going to be using the indefinite form such as taking the derivative before having defined what the function is.
syms t
f1(t) = 1
is not an error due to syms f1(t) not having been used.
Instead it is an error because the form requires a symbolic right hand side
syms t
f1(t) = sym(1)

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

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by