フィルターのクリア

Why is not working to use listbox in my case?

1 回表示 (過去 30 日間)
Muazma Ali
Muazma Ali 2024 年 1 月 21 日
コメント済み: Voss 2024 年 1 月 28 日
The problem :
This is a much much simpler version of my app three that I have called for tester_app_3.
When I write disp(app.error) before if app.error==1 in tester_app_3, it does not give me the right value though it is set to be right in the functions. The value of error is just set in the combinations’s functions CaCl2_MgCl2_ZnBr2 and NaCl2_KCl_ZnBr. The other functions just compute some other values
In other words the program is not going further to the combinations I chose. Thats why it gives me the value of app.error to be ==0
I have called the simpler version of my app3 as tester_app_3, reduced the app to be much smaller than it was by removing many functions from CaCl2_ MgCl2_ ZnBr2 and NaCl_KCl_ZnBr2 and letting the smaller functions remain a part of the functions. The only big functions that I have included are the two combinations functions CaCl2_ MgCl2_ ZnBr2 and NaCl_KCl_ZnBr2 and beregn_ionic_strength_best_salts_NaCl_KCl_ZnBr2 and beregn_ionic_strength_best_salts_CaCl2_MgCl2_ZnBr .
ONLY THE CaCl2_ MgCl2_ ZnBr2 and NaCl_KCl_ZnBr2 are relevant for the problem ( I had to adjust the code within these functions so that I didnt need to attach too many functions :).
Kindly help me with my problem.
  5 件のコメント
Muazma Ali
Muazma Ali 2024 年 1 月 28 日
@Voss I think you have misunderstood a little bit; I placed disp (app.error) statement after the if statement for CaCl2 MgCl2 and ZnBr2 and not after NaCl KCl ZnBr2 , thats why the value of disp(app.error ) must be 1 , when I dont chose the first combination of salts..and it is not that what the app is giving me..
Voss
Voss 2024 年 1 月 28 日
You think that you have written the program so that "the value of disp(app.error ) must be 1 , when I dont chose the first combination of salts", but that's not what the program is doing.
As I explained before, when index is [1 4 6], then the following line gives app.idx = [1 2 3]
app.idx = find(index);
In fact a selection of any three salts gives app.idx = [1 2 3]. Look:
find([1 4 6])
ans = 1×3
1 2 3
find([2 7 8])
ans = 1×3
1 2 3
find([99 100001 1823746])
ans = 1×3
1 2 3
Sounds like you mean to simply do:
app.idx = index;
instead of using find there.

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by