GUI and user-defined function
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Can anyone know what is the problem?![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/356974/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/356974/image.png)
This is the the user-defined function.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/356977/image.png)
This is the GUI. And when I run it, there are errors:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/356980/image.png)
0 Commenti
Risposte (1)
Mario Malic
il 6 Set 2020
Define your result as an empty array first. This may resolve your issues, depending on the rest of the code
result = [];
4 Commenti
Rik
il 6 Set 2020
elseif can be easier to read. It also allows compound conditions, which can be hard or impossible to create with switch,case.
These characters need to be encoded correctly inside the mlapp file and in the m file. If you aren't using R2020a you really need to be careful about editing, as you need to make sure Matlab saves the file encoded with UTF-8, which it does by default in R2020a, but not before. Many people have lost their é characters in their comments and chars and getting them replaced with questionmarks.
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!