Reputation: 29
The code block is the following
V=0:30
Gacc=V.^2/(g*L+Kus*V.^2)
Gyaw=V./(L+Kus*(V.^2/g))
I can perfectly get Gyaw as a vector but for Gacc I only get a scalar for the final input V=30. I tried it in a for loop and saw that it can calculate but somehow I only get the last one. How do I assign them to a vector?
g=9.81, L=2.794 and Kus=0.026294 all constants.
Upvotes: 0
Views: 27
Reputation: 40
Considering that the other variables are scalars, and only V is a vector, I think you forgot a dot before the division.
Gacc=(V.^2)./(g*L+Kus*V.^2)
Upvotes: 1