|
|
Start Function, but not wait for it to complete
I am new to matlab, so bear with me. I want to kick-off matlab for within a matlab function, but I don't want to want for the code to complete before I contiune in my function. How can you do that? Here is a rough example on what I am trying to do:
%Kick off do_math1 and do_math2 on the data in parallel...we will look for completion later
function do_math (data)
%Kick off do_math1, but don't wait for it to complete to continue
do_math1(data)
%Kick off do_math2, but don't wait for it to complete to continue
do_math2(data)
|
|
0
|
|
|
|
Reply
|
Dave
|
3/4/2010 2:04:21 PM |
|
"Dave " <moze_man@yahoo.com> wrote in message
news:hmoel5$8me$1@fred.mathworks.com...
>I am new to matlab, so bear with me. I want to kick-off matlab for within
>a matlab function, but I don't want to want for the code to complete before
>I contiune in my function. How can you do that? Here is a rough example
>on what I am trying to do:
>
> %Kick off do_math1 and do_math2 on the data in parallel...we will look for
> completion later
> function do_math (data)
> %Kick off do_math1, but don't wait for it to complete to continue
> do_math1(data)
>
> %Kick off do_math2, but don't wait for it to complete to continue
> do_math2(data)
To do what you described, you will need Parallel Computing Toolbox (or to
launch a separate MATLAB session in which to run each function.)
--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
|
|
0
|
|
|
|
Reply
|
Steven
|
3/4/2010 2:18:59 PM
|
|
We do have Parallel Computing Toolbox. Is there a to transform the code above to work with the Parallel Computing Toolbox?
|
|
0
|
|
|
|
Reply
|
Dave
|
3/4/2010 2:42:02 PM
|
|
|
2 Replies
397 Views
(page loaded in 0.023 seconds)
Similiar Articles: 'Deferred' functions? - comp.lang.javascript>> >> >> function may set focus on other object. >> >> That is not a good idea. ... with a stack of functions waiting to complete ... one will either have to start ... Waiting for ActiveX object to have initialized - comp.lang ...> However this code does not work, the wait javascript function > wasn't ... init) because I don't want to start ... the object even though it is not fully loaded. "complete ... fgets / read / select - comp.unix.programmerI am trying to write a function that works like fgets, but calls a hook function periodically while waiting for a complete line to be ready. The funct... OCEAN: Returning from paramRun() command using distributed ...The paramRun() function does not return ... block: When s_block is not nil, the OCEAN script halts until the job is complete. ... The wait() function is the best solution ... wait for key press - comp.soft-sys.matlab... to limit this to only a mouse or a keyboard input, which means when I start ... presses browser back ... switch back to conversational mode without waiting for a function ... Graphics.drawImage function not working, please help. - comp.lang ...... paint event), so it seems to work for a full object paint, but not ... System.out.println("Picture Paint - Start ... comp.soft-sys.matlab Graphics.drawImage function not ... show a wait box - comp.lang.javascript... as the thing that I must >> wait to complete "loading" is not ... function blocking waiting for user interaction - comp.lang ... ... things to get rstat to start on my ... Reading a Line from a file - comp.soft-sys.matlab> > function fgetl, does not work becuase, it start from first line to the > next. ... this extra file reading to a time when you don't have to wait ... Wait until window closed before continuing - comp.lang.javascript ...... function isMethodType(s) { return /\b(function ... It can be modified so that it does not wait for a window ... java.gui... wait until all initialization is complete ... creating a button on a figure to stop the program. - comp.soft-sys ...... is a loop that goes for ever and start plotting the data. im not ... I'd need to see the complete m-file. It's ... you did not define s inside the function so it will not be ... How To Start A Process And Wait For It To Complete? | out-web.netFurthermore, the function will not wait infinitely since it supports ... seconds for a process (and child processes) to complete. Like Posh v2′s Start-Process the function ... Waiting for Processes to Complete ActionsTo wait for a process to complete an action. Associate an instance of a Process component to a process you want to start. For more information, see Starting Processes. 7/24/2012 9:25:02 AM
|
|
|
|
|
|
|
|
|