How to multiple a vector by a scaler?

조회 수: 1 (최근 30일)
azadeh jalali
azadeh jalali 2022년 12월 2일
댓글: azadeh jalali 2022년 12월 3일
hello dear,
I want to know how to divide this attached 'm.mat' file by a scalar? for example, dividing by 0.279.
  댓글 수: 3
Dyuman Joshi
Dyuman Joshi 2022년 12월 2일
편집: Dyuman Joshi 2022년 12월 2일
I'm baffled that this is even a question.
m=rand(5,6)
m = 5×6
0.9207 0.2345 0.1915 0.8222 0.8735 0.4012 0.0588 0.5694 0.7646 0.2278 0.8091 0.9761 0.3039 0.3112 0.1738 0.3372 0.1562 0.1205 0.8722 0.2722 0.1791 0.8597 0.4618 0.8176 0.1461 0.3357 0.8367 0.5694 0.8718 0.3469
mat=m/0.279
mat = 5×6
3.3000 0.8405 0.6862 2.9469 3.1309 1.4380 0.2109 2.0410 2.7405 0.8165 2.8998 3.4986 1.0891 1.1154 0.6230 1.2086 0.5600 0.4319 3.1261 0.9758 0.6419 3.0815 1.6553 2.9304 0.5238 1.2031 2.9989 2.0408 3.1247 1.2435
azadeh jalali
azadeh jalali 2022년 12월 3일
you say right. but my 'm' file (attached, opent it in matlab) is a 1x200 vector.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Language Fundamentals에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by