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!