this is the app designer file i have this error in the imadjust how to fix it \the file will beattached below

1 回表示 (過去 30 日間)

採用された回答

Cris LaPierre
Cris LaPierre 2023 年 1 月 10 日
Your second input is not formatted correctly. It should be a 2 element vector, or a 2x3 numeric matrix. Based on where your semicolons are placed, you are creating a 3x2 element matrix instead (see here)
  • 2-by-3 matrix of the form [low_RGB_triplet; high_RGB_triplet]
Try this
app.TempEffect=imadjust(app.Modifies,[app.LowR, app.LowG, app.LowB; app.HighR, app.HighG, app.HighB]);
  3 件のコメント
jana
jana 2023 年 1 月 10 日
so i did it exactly like u did two element the error says this
Cris LaPierre
Cris LaPierre 2023 年 1 月 10 日
編集済み: Cris LaPierre 2023 年 1 月 10 日
First, see DGM's reply. If would appear your image is not an RGB image, which means you will get an error.
However, here it appears the error is that you have not matched your brackets and parentheses correctly.
% Correct
a = ([1 2 3;4 5 6])
% your error
a = ([1 2 3;4 5 6))
Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

サインインしてコメントする。

その他の回答 (2 件)

Image Analyst
Image Analyst 2023 年 1 月 10 日
You need to pass in the correct arguments to imadjust, like two two-element vectors, not like what you did. Check the help.

Walter Roberson
Walter Roberson 2023 年 1 月 10 日
You appear to be missing the ] corresponding to the [ that starts your second parameter.

Community Treasure Hunt

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

Start Hunting!

Translated by