Undefined function or method 'Rayleighchannel' for input arguments of type 'double'

When i want to simulate it into my program i am finding it as error
???Undefined function or method 'RayleighCH' for input arguments of type 'double'. Can any one suggest me??

댓글 수: 1

RayleighCH is not a built in MATLAB function, so that means someone likely created their own function called RayleighCH and implemented it in their program. If I had to guess you are trying to use code acquired from someone else and they didn't give you all of the required code. It is also possible that the function file does exist on your computer, but it is not located on the current path.

댓글을 달려면 로그인하십시오.

답변 (2개)

I'm confused because your title and your actual text differ in what you say is undefined.
Is it RayleighCH or Rayleighchannel? In either case, this is not a MathWorks' function/method, so if you have written it, or gotten it from somebody you have to make sure that whatever directory/folder you saved it in is added to the MATLAB path.
If you saved it in c:\mfiles, then
>>addpath 'c:\mfiles'
to add that folder. Or use
>>pathtool

댓글 수: 2

actually i have saved my file 1.m in c drive i.e, c:\1.m file. Do i need to write that RayleighCH or Rayleighchannel function in a different m-file and put both of them in a same directory i.e, c:\? or any other solution? please suggest.
Note: numeric filenames are not permitted for .m files

댓글을 달려면 로그인하십시오.

Wayne King
Wayne King 2012년 9월 25일
If you want to call the RayleighCH function from the command line, it is best to make it a standalone function and the folder must be on the path. I would recommend not just putting it under c:\
make a folder, mfiles, or something like that.

댓글 수: 3

So, i am making the RayleighCH function in a different name like Rayleigh.m file in a new folder of c:\.
The name of the .m file must match the name of the function.
Walter's point is important. Why would you make a function named RayleighCH an M-file named Rayleigh.m?

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Environment and Settings에 대해 자세히 알아보기

태그

질문:

2012년 9월 25일

Community Treasure Hunt

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

Start Hunting!

Translated by