what does "X = X./max(max(X))" means?>
4 ビュー (過去 30 日間)
古いコメントを表示
>> X=[1,2,3,4]
X =
1 2 3 4
>> X = X./max(max(X));
>> X
X =
0.2500 0.5000 0.7500 1.0000
>>
I understand from the output, but what does "./" means?
0 件のコメント
回答 (3 件)
Stephan
2019 年 3 月 12 日
編集済み: Stephan
2019 年 3 月 12 日
Hi,
the dot means an elementwise operation. See here:
For more information to this topic see:
Best regards
Stephan
Abdulmanan Butt
2019 年 3 月 13 日
編集済み: Abdulmanan Butt
2019 年 3 月 13 日
Hi,
It means,
You are dividing X matrix (element-wise) with the element of matrix X having maximum value.
Like in this case, max(X) or max(max(X)) will be 4, and you are going to divide matrix X with that 4, Where 4 will be divided to each element of matrix X in this element-wise division case, So you got the final result,
X= 0.2500 0.5000 0.7500 1.0000
Regards,
Abdulmanan Butt
4 件のコメント
参考
カテゴリ
Help Center および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!