Requires more input arguments to run

I dont know what i'm doing wrong :( please help me <3
function y = Vin(t)
A = 220*sqrt(2);
f = 50;
y = 2*A*sin(2*pi*f*t);
end

Respuestas (1)

KSSV
KSSV el 29 de Abr. de 2021
It looks like you are starught away running the function using run button or F5 key. This is not the way to call a function.
Say your function is:
fuction c = myfun(a,b)
c= a+b ;
end
Now call the function.
a = 1 ; % define your variablesv
b = 2 ;
c = myfun(a,b);

2 comentarios

pablo jimenez
pablo jimenez el 29 de Abr. de 2021
so i need two scripts to run just one function?
pablo jimenez
pablo jimenez el 29 de Abr. de 2021
thanks dude, i have already solved it

Iniciar sesión para comentar.

Categorías

Más información sobre Geographic Plots en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 29 de Abr. de 2021

Comentada:

el 29 de Abr. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by