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

답변 (1개)

KSSV
KSSV 2021년 4월 29일

1 개 추천

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

pablo jimenez
pablo jimenez 2021년 4월 29일
so i need two scripts to run just one function?
pablo jimenez
pablo jimenez 2021년 4월 29일
thanks dude, i have already solved it

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

카테고리

도움말 센터File Exchange에서 Geographic Plots에 대해 자세히 알아보기

태그

질문:

2021년 4월 29일

댓글:

2021년 4월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by