Borrar filtros
Borrar filtros

??? Undefined function or method 'hw1_p2_x_vs_k' for input arguments of type 'double'. "

1 visualización (últimos 30 días)
k=[1:i-1];
r_db = log10(r) .* 10;
k_db = k .* 10;
hw1_p2_x_vs_k(k,p,'power [W]');
%hw1_p2_x_vs_k(k,r,'snr');
hw1_p2_x_vs_k(k,r_db,'snr [db]');
hw1_p2_x_vs_k(k,e,'error of SNR');
hw1_p2_x_vs_k(k,alpha,'alpha');
hw1_p2_x_vs_k(k,p,'power [W]');
hw1_p2_x_vs_k(k,alpha,'alpha');
I get this error when I try to run this in my program
"hw1_p2_x_vs_k(k,alpha,'alpha');
??? Undefined function or method 'hw1_p2_x_vs_k' for input arguments
of type 'double'. "

Respuesta aceptada

Walter Roberson
Walter Roberson el 10 de Nov. de 2011
I do not see anything obvious, but please recheck all of your code lines to be sure that all of them use h w digit-for-one, and that none of them use h w lower-case-L

Más respuestas (1)

Wayne King
Wayne King el 10 de Nov. de 2011
In addition to Walter's suggestion, also check that you have saved that function in a folder on the MATLAB path. If you enter
>>which hw1_p2_x_vs_k
You should get the path to that function returned. If you get 'hw1_p2_x_vs_k' not found, check your spelling carefully as Walter has suggested. If that is not the problem, make sure the folder (directory) that you have the functions in is listed when you enter
>>path
If not, use addpath (see the help) or pathtool
>>pathtool
to add the folder.

Categorías

Más información sobre Search Path en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by