Al momento, stai seguendo questa domanda
- Vedrai gli aggiornamenti nel tuofeed del contenuto seguito.
- Potresti ricevere delle e-mail a seconda delle tuepreferenze per le comunicazioni.
Whats wrong with tester_app_3?
8 Commenti
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3086111
-
Link
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3086111
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3101761
-
Link
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3101761
- I shortened the code so you just have the possibility to choose two types of combination from the listbox in tester_app_3: CaCl2 MgCl2 ZnBr2 and NaCl2 KCl ZnBr2.
- When I start the tester_app_2 that leads me to tester_app_3, I choose the nr of zones to be 3 and the nr of salts to be 3. Then I choose this salt combination CaCl2 MgCl2 ZnBr2 and choose ME.
- As you can see , the program is not accumulating osmotic_table results since I am getting zeros in all rows instead of my results. I am supposed to get three rows as I had chosen nr of zones to be 3.
- Since I have this code in tester_app_3
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3101771
-
Link
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3101771
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3101966
-
Link
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3101966
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3103076
-
Link
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3103076
- I shortened the code so you just have the possibility to choose two types of combination from the listbox in tester_app_3: CaCl2 MgCl2 ZnBr2 and NaCl2 KCl ZnBr2.
- When I start the tester_app_2 that leads me to tester_app_3, I choose the nr of zones to be 3 and the nr of salts to be 3. Then I choose this salt combination CaCl2 MgCl2 ZnBr2 and choose ME.
- As you can see , the program is not accumulating osmotic_table results since I am getting zeros in all rows instead of my results. I am supposed to get three rows as I had chosen nr of zones to be 3.
- Since I have this code in tester_app_3
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3103301
-
Link
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3103301
- Run tester_app2.mlapp
- Enter 3 for Nr of zones and 3 for Nr of salts
- Click Choose salts! button
- Selected CaCl2, MgCl2, and ZnBr2
- Clicked Start_analysis button
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3103306
-
Link
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3103306
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3104151
-
Link
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3104151
Risposta accettata
- Do not to make a variable an app property unless it's necessary to do so. Generally it's only necessary if that variable needs to be shared among multiple apps (in which case it must be a public property) or multiple functions within one app (in which case it can be a private property). I found that most of your app properties were really only needed in one function, so those have been made into local variables in the function where they are used. You can see the list of app properties now to get an idea of the very few really necessary app properties in each app, and understand why those particular things need to be app properties.
- Error-check and validate a variable value before storing it as an app property. It makes your programming job easier if you know your app properties are always valid (and consistent with each other).
- In general, think about what the program needs to do when the user entered something invalid. Arguably more important than (as least equally as important as) doing the right thing when a good value is entered is not doing the wrong thing (i.e., crashing / generating an uncaught error) when a bad value is entered. In designing GUIs you have to give plenty of thought to all the bad states the program can get into, not only the one good state where everything is fine.
16 Commenti
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3123766
-
Link
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3123766
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3123946
-
Link
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3123946
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3164126
-
Link
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3164126
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3165096
-
Link
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3165096
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3165376
-
Link
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3165376
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3165656
-
Link
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3165656
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3193246
-
Link
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3193246
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3199746
-
Link
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3199746
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3200661
-
Link
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3200661
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3200666
-
Link
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3200666
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3200696
-
Link
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3200696
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3200746
-
Link
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3200746
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3201716
-
Link
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3201716
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3201776
-
Link
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3201776
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3204661
-
Link
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3204661
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3205436
-
Link
Link diretto a questo commento
https://it.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3205436
Più risposte (0)
Vedere anche
Categorie
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Si è verificato un errore
Impossibile completare l'azione a causa delle modifiche apportate alla pagina. Ricarica la pagina per vedere lo stato aggiornato.
Seleziona un sito web
Seleziona un sito web per visualizzare contenuto tradotto dove disponibile e vedere eventi e offerte locali. In base alla tua area geografica, ti consigliamo di selezionare: .
Puoi anche selezionare un sito web dal seguente elenco:
Come ottenere le migliori prestazioni del sito
Per ottenere le migliori prestazioni del sito, seleziona il sito cinese (in cinese o in inglese). I siti MathWorks per gli altri paesi non sono ottimizzati per essere visitati dalla tua area geografica.
Americhe
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia-Pacifico
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)