Error in piecewise function

조회 수: 1 (최근 30일)
pchem
pchem 2017년 5월 4일
댓글: Walter Roberson 2017년 5월 5일
I keep getting this error when I try to run my code containing a piecewise function:
Undefined function or variable 'privResolveArgs'.
Error in piecewise (line 35)
args = privResolveArgs(varargin{:});
Error in dischargecalc_2017_4_25 (line 65)
avg_e_energy=piecewise(3*10^6 < elec_field_r < 9*10^6, 4.1367*log(elec_field_r)-58.555, 9*10^6 <
elec_field_r < 3*10^7, 5*10^(-7)*elec_field_r+3.0354);
I thought it might be a path error, but I cannot even locate the privResolveArgs function.
>> which privResolveArgs
'privResolveArgs' not found.
When I try to add my entire toolbox folder to the path it does not fix the problem

답변 (1개)

Walter Roberson
Walter Roberson 2017년 5월 5일
privResolveArgs is a method in the sym class, at toolbox/symbolic/symbolic/@sym/sym.m
Possibly you do not have the Symbolic Toolbox installed or licensed.
  댓글 수: 2
pchem
pchem 2017년 5월 5일
I have the symbolic toolbox installed and followed the procedure to update my license, however it is still giving me the same error message. I have also ensured that the symbolic toolbox is in my path.
Walter Roberson
Walter Roberson 2017년 5월 5일
If
which privResolveArgs
does not give you any result, then you either do not have a current symbolic toolbox installed or else it is not on your MATLAB path.

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by