Undefined function 'ShortLine' for input arguments of type 'double'.
이전 댓글 표시
%***- - - - - Main Program
function test()
TransmissionLineData;
[ZSeries,YShunt] = ShortLine(nphc,ngw,nb,bsep,resis,rdext,gmr,x,y,f, sigmag,vbase,sbase)
[Z012,Y012] = SequenceImpedance(ZSeries,YShunt);
%End main Program
function [Z012,Y012] = SequenceImpedance(ZSeries,YShunt)
TS(1,1) = 1;
TS(1,2) = 1;
TS(1,3) = 1;
TS(2,1) = 1;
TS(2,2) = -0.5-sqrt(3)*0.5*i;
TS(2,3) = -0.5+sqrt(3)*0.5*i;
TS(3,1) = 1;
TS(3,2) = -0.5+sqrt(3)*0.5*i;
TS(3,3) = -0.5-sqrt(3)*0.5*i;
ST = inv(TS);
Z012 = ST*ZSeries*TS;
Y012 = ST*YShunt*TS;
댓글 수: 12
Geoff Hayes
2017년 12월 15일
Mohd - is ShortLine a function that you have written or have downloaded from somewhere? The error suggests that MATLAB can't find that function or you are not providing the correct input parameters.
In the command window type
which ShortLine
The above will return the full path for the function if it can be found. If it can't be found, then try adding it (or rather the folder that it is in) to your MATLAB search path. See https://www.mathworks.com/help/matlab/matlab_env/what-is-the-matlab-search-path.html for details.
MOHD ABDUL MUQEEM
2017년 12월 15일
Adam
2017년 12월 15일
So have you define dthe function and added it to your path?
Adam
2017년 12월 15일
Please format your code, it is almost impossible to work out what is on each line and what is in a comment.
MOHD ABDUL MUQEEM
2017년 12월 15일
MOHD ABDUL MUQEEM
2017년 12월 15일
MOHD ABDUL MUQEEM
2017년 12월 15일
편집: Walter Roberson
2017년 12월 15일
MOHD ABDUL MUQEEM
2017년 12월 15일
편집: Walter Roberson
2017년 12월 15일
MOHD ABDUL MUQEEM
2017년 12월 15일
편집: Walter Roberson
2017년 12월 15일
MOHD ABDUL MUQEEM
2017년 12월 15일
편집: Walter Roberson
2017년 12월 15일
MOHD ABDUL MUQEEM
2017년 12월 15일
편집: Walter Roberson
2017년 12월 15일
Walter Roberson
2017년 12월 15일
I am confused. You have posted several different function test(), only one of which defines function ShortLine . I do not know which one is the correct version.
If you define a function inside a .m but not as the first function in the file, then that second function cannot be called from outside the .m (unless you pass out a handle to it.)
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!