Error using sin in my code
이전 댓글 표시
I keep getting error using sin and Not enough input arguments. I'm not sure what I did wrong here
x = z + (1/s).*sin.*(s*r0*t);
채택된 답변
추가 답변 (1개)
Walter Roberson
2023년 9월 19일
0 개 추천
The .* operator is element-by-element multiplication. Your code is asking to evaluate the token sin and multiply the result by (s*r0*t) . But sin as a token is a request to evaluate the sin function with no parameters, which is a problem because sin() needs to be passed one parameter.
If you want to take the sine of something, you need sin(EXPRESSION) such as sin(s*r0*t)
카테고리
도움말 센터 및 File Exchange에서 Entering Commands에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!