why do error appears such as "Arrays have incompatible sizes for this operation."?
516 ビュー (過去 30 日間)
古いコメントを表示
Arrays have incompatible sizes for this operation.
Error in fitting_method_iefa (line 238)
Different2 = sum((y-Convolution).^2);
why does this error appears?
1 件のコメント
Dyuman Joshi
2023 年 5 月 6 日
編集済み: Dyuman Joshi
2023 年 5 月 16 日
The reason is stated in the error - "Arrays have incompatible sizes for this operation."
For e.g., you can not subtract a 2x3 array from a 3x2 array. Thus, for substraction these arrays have incompatible size.
Check the size of the arrays "y" and "Convolution".
回答 (2 件)
Walter Roberson
2023 年 5 月 16 日
The story sometimes gets told that originally Loren phrased the error message as "Didn't Think Twice. Wasn't All Right." but that George didn't like The Greatful Dead and made her change the message.
0 件のコメント
Sourabh
2023 年 5 月 15 日
編集済み: Sourabh
2023 年 5 月 16 日
The error "Arrays have incompatible sizes for this operation" in MATLAB occurs when you try to perform operations (such as subtraction) on two arrays that have different sizes or dimensions that are not compatible with each other.
You can understand Array size compatibility from the following link:
All the best.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Structures についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!