Why am I getting this error?

2 ビュー (過去 30 日間)
Muazma Ali
Muazma Ali 2023 年 4 月 8 日
コメント済み: dpb 2023 年 4 月 8 日
When i try to use my app3 and send this function to it, I get this error (see the attached doc)
Can anybody please tell me how I can fix the issue? I will be very thankful. :)

回答 (1 件)

dpb
dpb 2023 年 4 月 8 日
移動済み: dpb 2023 年 4 月 8 日
Very difficult to debug stuff that have to download to see -- going forward put the pertinent lines of code in the Q? body and format with the "Code" button...
But, the one that can open in the browser window tells the story in the error message -- it says "Input A of class cell and Input B of class double" -- so in the code line
if all(ismember(result),[1 2 3])
the variable result must be a cell array and we can see the array of doubles for B.
So, dereference the content of result
if all(ismember(result{:}),[1 2 3])
(or don't create it as a cell to begin with).
  2 件のコメント
Muazma Ali
Muazma Ali 2023 年 4 月 8 日
@dpb well actually the problem is just that I dont know how to deal with the output from list in app ; based on the result, I want to conduct some operations from a function but I have problems in investigating the output from the list in the right way;
How can I program so to investigate that it contains some chosen salts from the list based on their position for instance..?
dpb
dpb 2023 年 4 月 8 日
Would need to see the pertinent code itself as said...folks aren't likely going to take the time to download and try to look at a whole app file.
Logical addressing with ismember or just the indices themselves is a likely solution, the above if construct will only be true if all of the elements 1:3 are in the result vector so that may not be what you're really looking for...provide enough context in the question body itself to explain the problem and the desired result -- and that won't take the entire app code, just the specific callback function.

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

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by