what does "X = X./max(max(X))" means?>
Ältere Kommentare anzeigen
>> 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?
Antworten (3)
Hi,
the dot means an elementwise operation. See here:
For more information to this topic see:
Best regards
Stephan
Matlaber
am 12 Mär. 2019
0 Stimmen
Abdulmanan Butt
am 13 Mär. 2019
Bearbeitet: Abdulmanan Butt
am 13 Mär. 2019
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 Kommentare
Matlaber
am 13 Mär. 2019
Abdulmanan Butt
am 13 Mär. 2019
Bearbeitet: Abdulmanan Butt
am 13 Mär. 2019
Ok i got your point. Thats the only when we have one element in second matrix . Lets take an example,
X= [1 2 3 4]
Y=[1 2 3 4]
If we include "." we got answer [1 1 1 1]
and we dont include that dot, wwe will get answer 1.
Actually when we include ".", we will get bit to bit division, menas 1st element of one matrix will be divided by 1st element of second matrix
Kindly have a look on attachment.
Got the point ?
Matlaber
am 13 Mär. 2019
Abdulmanan Butt
am 13 Mär. 2019
Yes..!!
Welcome.
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
