Why is not working to use listbox in my case?
3 views (last 30 days)
Show older comments
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 Comments
Voss
on 28 Jan 2024
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])
find([2 7 8])
find([99 100001 1823746])
Sounds like you mean to simply do:
app.idx = index;
instead of using find there.
Answers (0)
See Also
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!