how can i solve the error? >> f_function Error: File: f_function.m Line: 1 Column: 29 Unbalanced or unexpected parenthesis or bracket
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Junaid Qadir
el 28 de Sept. de 2017
Respondida: Walter Roberson
el 28 de Sept. de 2017
function y = f_function(rand(1,1)*depth,neighboure_Noise(p))
y=(1/rand(1,1)*depth*neighboure_Noise(p));
end
the error are like this
>> f_function
Error: File: f_function.m Line: 1 Column: 29
Unbalanced or unexpected parenthesis or bracket
0 comentarios
Respuesta aceptada
Walter Roberson
el 28 de Sept. de 2017
The portion after the function name can only be parameter names, not expressions. You appear to be using parameters depth, neighboure_Noise, and p, so you would need something like
function y = f_function(depth, neighboure_Noise, p)
y=(1/rand(1,1)*depth*neighboure_Noise(p));
end
You would not be able to run that by click the green arrow: you would have to go down to the command line and pass in appropriate parameters, such as
Noise = sort(rand(1,50));
noise_index = 17;
depth = 14.38;
result = f_function(depth, Noise, noise_index)
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Chemical Process Design en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!