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.
how can i open my files?
Risposta accettata
39 Commenti
- Why are there two callback functions? If you have one callback event, then the variables in one function workspace are not going to magically jump into the other workspace, so why do you separate them? For example there is no way for name to jump magically from loaddata_Callback to Read_Callback.
- You do nothing inside the first for loop anyway, apart from assign one name value to C, which then never gets used. What is the point of that?
- Calling fopen('C','r') will try to open a file named 'C' in the current directory. If you want to refer to the variable C, then you need to remove those single-quotes so that it is a variable and not a string.
- Do not use path as a variable name, as path is already defined in MATLAB.
- You should use fullfile rather than simply concatenating the path and filenames.
- Why are the uigetfile file-types labeled as being 'All Matlab Files'? Those are not standard MATLAB file extensions.
- Learn to use the semicolon to suppress displaying outputs.
- pay attention to the MATLAB Editor's code warnings. Currently I get a whole pile of orange warnings about small improvements that could be made.
- format your code consistently. Currently your indenting is quite random: use the standard four space characters for loops and the like. This will make it easier to notice problems like not having enough end's.
- Learn to use the MATLAB debugging tools. An important part of writing code is knowing how to debug code. Learning to debug makes you much more independent, a better programmer and teaches you new things about the language you are using.
- Use MATLAB's documentation. Don't just copy the code that someone puts here in an answer. Read about the functions and operations that it uses, and understand how it works.
- Use the debugging tools to view a function workspace.
- Use output arguments to return values from a function to the base workspace.
Più risposte (0)
Vedere anche
Categorie
Tag
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 (한국어)