Vous suivez désormais cette question
- Les mises à jour seront visibles dans votre flux de contenu suivi.
- Selon vos préférences en matière de communication il est possible que vous receviez des e-mails.
Whats wrong with tester_app_3?
8 commentaires
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3086111
-
Lien
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3086111
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3101761
-
Lien
Utiliser le lien direct vers ce commentaire
https://fr.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
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3101771
-
Lien
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3101771
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3101966
-
Lien
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3101966
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3103076
-
Lien
Utiliser le lien direct vers ce commentaire
https://fr.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
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3103301
-
Lien
Utiliser le lien direct vers ce commentaire
https://fr.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
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3103306
-
Lien
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3103306
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3104151
-
Lien
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3104151
Réponse acceptée
- 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 commentaires
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3123766
-
Lien
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3123766
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3123946
-
Lien
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3123946
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3164126
-
Lien
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3164126
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3165096
-
Lien
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3165096
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3165376
-
Lien
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3165376
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3165656
-
Lien
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3165656
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3193246
-
Lien
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3193246
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3199746
-
Lien
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3199746
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3200661
-
Lien
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3200661
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3200666
-
Lien
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3200666
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3200696
-
Lien
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3200696
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3200746
-
Lien
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3200746
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3201716
-
Lien
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3201716
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3201776
-
Lien
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3201776
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3204661
-
Lien
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3204661
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3205436
-
Lien
Utiliser le lien direct vers ce commentaire
https://fr.mathworks.com/matlabcentral/answers/2089611-whats-wrong-with-tester_app_3#comment_3205436
Plus de réponses (0)
Voir également
Catégories
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Une erreur s'est produite
Impossible de terminer l’action en raison de modifications de la page. Rechargez la page pour voir sa mise à jour.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.
Amériques
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- 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)
Asie-Pacifique
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)