Not enough input arguments. Error in ratio_magnitude (line 6) RV1 =1/sqrt(1+((f*s)/p)^2);
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Zulma Martinez
el 15 de Mzo. de 2019
Respondida: madhan ravi
el 15 de Mzo. de 2019
function [RV1]= ratio_magnitude(p, s, f)
%This function calculate the ratio of the magnitude of the input voltaje
% The function has as a imput the ratio and the voltaje also an array
% with 200 points of w
RV1 =1/sqrt(1+((f*s)/p)^2);
end
0 comentarios
Respuesta aceptada
KSSV
el 15 de Mzo. de 2019
It seems you are not providing inputs to the function and starught away running to code.......you cannot use a function like that. You need to save it, go to the folder where the function is present and define funcitons inputs and then call the function.
p = rand ; % give your value here instead of rand
s = rand ; % give your value here instead of rand
f = rand ; % give your value here instead of rand
RV1= ratio_magnitude(p, s, f)
0 comentarios
Más respuestas (1)
madhan ravi
el 15 de Mzo. de 2019
p=...; values here
s=...;
f=...;
RV1 = ratio_magnitude(p, s, f) % function call
% save function as a separate file named ratio_magnitude.m
function RV1 = ratio_magnitude(p, s, f)
%This function calculate the ratio of the magnitude of the input voltaje
% The function has as a imput the ratio and the voltaje also an array
% with 200 points of w
RV1 =1./sqrt(1+((f.*s)./p).^2); % use dot infront of arithmetic operators
end
0 comentarios
Ver también
Categorías
Más información sobre Operators and Elementary Operations 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!