getting error while executing code
정보
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
이전 댓글 표시
sir while executing the following code i get and error. error is also attested below kindly help me so that i can run this code.
h = waitbar(0,'Please wait...');
warning off
for i=1:length(wind_dir)
for j=1:stacks
C=gauss_func(Q(j),wind_speed(i),wind_dir(i),x,y,z,...
stack_x(j),stack_y(j),H(j),Dy,Dz,stability(i));
C1(:,:,i)=C1(:,:,i)+C;
end
waitbar(i/length(wind_dir),h);
end
warning on;
close(h);
_ _ * * * * * * Undefined function or variable 'gauss_func'******__.
댓글 수: 1
Please read and apply: https://www.mathworks.com/matlabcentral/answers/13205-tutorial-how-to-format-your-question-with-markup#answer_18099 Thanks.
Please post a copy of the complete error message in every case.
답변 (1개)
Jan
2017년 3월 12일
The error message is clear: Matlab cannot find a function called "gauss_func". Do you have such an M-file? If so, where is it stored? Matlab finds M-files only in the current folder or if the folder is appended to the path. See:
doc addpath
댓글 수: 2
Basant chandra
2017년 3월 12일
Walter Roberson
2017년 3월 12일
Sorry, we do not know any gauss_func . There is no routine by that name in MATLAB or in any File Exchange contribution. There is a gaussfunc defined in some File Exchange contributions, but it takes only 3 parameters. The MATLAB-based gauss_func that I can see reference to by searching with Google take only 3 parameters.
We have to guess that you have your own gauss_func.m . You will need to look in your directories to find it, and then use pathtool to add that directory to your MATLAB path.
이 질문은 마감되었습니다.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!