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 Comment

Jan
Jan on 12 Mar 2017
Edited: Jan on 12 Mar 2017
Please post a copy of the complete error message in every case.

Answers (1)

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 Comments

sir kindly tell more about this error and how to execute this error
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.

This question is closed.

Asked:

on 12 Mar 2017

Closed:

on 20 Aug 2021

Community Treasure Hunt

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

Start Hunting!