MATLAB Answers

0

how to divide matrices that print matrix

Asked by Geon Jung on 12 Sep 2019
Latest activity Commented on by per isakson
on 12 Sep 2019
clc;clear;
v2=[0,45,85,100];
t=[0,1.5,3,5];
a =v2/t ;
disp(a);
I thought "a" would print out in matrix form which it did not.
I need the answer in [a,b,c,d] form.

  1 Comment

Replace
a =v2/t ;
by
a =v2./t ;

Sign in to comment.

1 Answer

Answer by Image Analyst
on 12 Sep 2019
 Accepted Answer

Try
a = v2 ./ t % Use dot-slash ./ instead of /
No disp(a) needed if you leave off the semicolon.

  0 Comments

Sign in to comment.