Ahora está siguiendo esta pregunta
- Verá actualizaciones en las notificaciones de contenido en seguimiento.
- Podrá recibir correos electrónicos, en función de las preferencias de comunicación que haya establecido.
how can i open my files?
Respuesta aceptada
39 comentarios
- 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.
Más respuestas (0)
Ver también
Categorías
Etiquetas
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Se ha producido un error
No se puede completar la acción debido a los cambios realizados en la página. Vuelva a cargar la página para ver el estado actualizado.
Seleccione un país/idioma
Seleccione un país/idioma para obtener contenido traducido, si está disponible, y ver eventos y ofertas de productos y servicios locales. Según su ubicación geográfica, recomendamos que seleccione: .
También puede seleccionar uno de estos países/idiomas:
Cómo obtener el mejor rendimiento
Seleccione China (en idioma chino o inglés) para obtener el mejor rendimiento. Los sitios web de otros países no están optimizados para ser accedidos desde su ubicación geográfica.
América
- 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-Pacífico
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)