Finding Y vector using a given X vector and a equation
이전 댓글 표시
I have the equation Y= X^2
Given X = [1:0.5:3]
Calucluate in code the Y Vector
How Do I So .
댓글 수: 2
Matt J
2019년 10월 3일
In what way are you "overthinking" it? What are you thinking?
Chandler Vaughan
2019년 10월 3일
답변 (1개)
Jess Lovering
2019년 10월 3일
You have to define your vector and then pass it into your equaiton but make sure to use .^ instead of ^ so that it goes element-wise through your equation.
X = [1:0.5:3]
Y = X.^2
카테고리
도움말 센터 및 File Exchange에서 Mathematics에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!