Code wont work keeps giving error message: Argument to dynamic structure reference must evaluate to a valid field name.
조회 수: 1 (최근 30일)
이전 댓글 표시
this is my code:
t=0:0.001:10; wn= 0.898; a= 0.843; z= 0.005122; wd=0.897;
y= a*(exp.(-z*wn*t))*(sin(wd*t)) and I keep getting the same error message can someone help please thanks
댓글 수: 0
답변 (2개)
Star Strider
2017년 9월 30일
Put the ‘dot operator’ here instead:
y = a*(exp(-z*wn*t)) .* (sin(wd*t))
↑
That will do the element-wise multiplication you intend.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Structures에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!