Changing Global Variable
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am simulating a fluidized bed system, in which I would like to pass two values calculated from ODE45 as input into other functions. Since the two calculated values of the ODE45 changes every time, I have to export the calculations into .mat file (and using -append to store the latest calculated values), and then read these values by using dlmread. But this is taking a long time, approx. 15 days.
Is there any methods for me to perform this task (i.e. share the two calculated values, without using global, and without using the passing argument)? Please help me as I am officially stuck for a week now.
Thank you.
0 comentarios
Respuestas (2)
Image Analyst
el 20 de Feb. de 2012
Wow, I've never heard of dlmread taking 15 days. How big are the files? In fact I've never heard of anyone even using dlmread to read .mat file - I always hear of people using load() to read .mat files. Anyway, I'm not sure why you can't just pass in your arguments via the argument list. So what if they change every time? Usually arguments change every time - that's why functions are built. But you can use setappdata() and getappdata() if you want to, though I still don't know why that would be necessary. Or you can read the FAQ: http://matlab.wikia.com/wiki/FAQ#How_can_I_share_data_between_callback_functions_in_my_GUI.3F
0 comentarios
Ver también
Categorías
Más información sobre Ordinary Differential Equations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!