Pergunta

I am trying to call a function from the command window, but I constantly am obstacle by the message

Undefined function 'gDiscrPdfRnd' for
input arguments of type 'double'.

So, I searched this messaged in google. According to this post here, a possible cause for this is that matlab can not find the file. I found this page which tells of how to add the path. So, I typed in the command

addpath('C:\Users\Eli\Documents\MATLAB\final project\help')

and then I typed in

which gDiscrPdfRnd

which gave me the error 'gDiscrPdfRnd' not found. How can I fix this?

EDIT: The output of cd('C:\Users\Eli\Documents\MATLAB\final project\help');dir is

.                       IdealGasSimulation.zip  randpdf                 
..                      gDiscrPdfRnd funct      randpdf.zip             
IdealGasSimulation      gDiscrPdfRnd funct.zip  
Foi útil?

Solução

There is no file gDiscrPdfRnd.m in the folder, put it into the help directory or add the folder where the gDiscrPdfRnd.m is placed.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top