whats wrong with my code??

Answers (1)

Yoiu need to do element-wise operationsn (using the dot operator):
v=((m.*g)-(m.*a))./k
See Array vs. Matrix Operations for details.

1 Comment

If my Answer helped you solve your problem, please Accept it!
.

Sign in to comment.

Tags

Asked:

on 25 Jan 2021

Commented:

on 25 Jan 2021

Community Treasure Hunt

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

Start Hunting!