how to divide matrices that print matrix

2 ビュー (過去 30 日間)
Geon Jung
Geon Jung 2019 年 9 月 12 日
コメント済み: per isakson 2019 年 9 月 12 日
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 件のコメント
per isakson
per isakson 2019 年 9 月 12 日
Replace
a =v2/t ;
by
a =v2./t ;

サインインしてコメントする。

採用された回答

Image Analyst
Image Analyst 2019 年 9 月 12 日
Try
a = v2 ./ t % Use dot-slash ./ instead of /
No disp(a) needed if you leave off the semicolon.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDynamic System Models についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by