Matrix dimesions must agree.

Why I do get error Matrix dimensions must agree?
t = (0:5:60);
a = (0:10:100);
s = (a.*t.^2)./2;
p1 = plot(a,s);

 Accepted Answer

Ameer Hamza
Ameer Hamza on 3 May 2018
Edited: Ameer Hamza on 3 May 2018
The number of the elements in t and a must be equal. It appears you meant to write
t = 0:5:50;

More Answers (0)

Categories

Asked:

on 3 May 2018

Edited:

on 3 May 2018

Community Treasure Hunt

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

Start Hunting!