Hi All,
Dose anyone know if there is somthing wrong with this line of code:
A=(A/(max(A, [], 'all')));
All, I wanna do is to normalize the "A" matrix to have max value of 1.
A is a 64*64
thank you

回答 (1 件)

Voss
Voss 2022 年 5 月 6 日

0 投票

Seems ok as-is, but there are two extraneous pairs of parentheses (which would not cause the error you see)
A=A/max(A, [], 'all');
My guess is the error is caused by a missing parenthesis or bracket (or similar) or possibly a missing end somewhere else. Not on this line, but (probably) nearby.

カテゴリ

ヘルプ センター および File ExchangeMatrices and Arrays についてさらに検索

タグ

質問済み:

2022 年 5 月 6 日

回答済み:

2022 年 5 月 6 日

Community Treasure Hunt

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

Start Hunting!

Translated by