|
-
Jul 30th, 2003, 09:36 AM
#1
Thread Starter
Frenzied Member
DoEvents in MATLAB *resolved*
Has anyone ever used MATLAB? If you have, can you point me to any functions that are equivalent to DoEvents in VB?
I have a while loop, but the user can't press any buttons while that loop is active...and so the loop can't be terminated.
Thanks.
Last edited by nishantp; Jul 30th, 2003 at 02:39 PM.
You just proved that sig advertisements work.
-
Jul 30th, 2003, 09:39 AM
#2
Why are you asking in Chit Chat? You know you wont get a serious answer.
-
Jul 30th, 2003, 09:41 AM
#3
Thread Starter
Frenzied Member
We havn't really got a special forum for this do we?
EDIT - do you think the mods will be mad if I ask in Gen VB?
You just proved that sig advertisements work.
-
Jul 30th, 2003, 09:45 AM
#4
Addicted Member
I seem to remember that there is a sleep() command in matlab
-
Jul 30th, 2003, 09:46 AM
#5
Retired VBF Adm1nistrator
Originally posted by nishantp
EDIT - do you think the mods will be mad if I ask in Gen VB?
Do you honestly think we take this job so seriously we actually get worked up and mad about people posting in the wrong forums ?
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Jul 30th, 2003, 09:46 AM
#6
Might try General PC if its not directly VB related. Its just too easy for people to give you a silly answer here, so thats why i said something.
-
Jul 30th, 2003, 09:51 AM
#7
Addicted Member
Is this a grahics/drawing issue? If it is you could use the drawnow function (see HELP DRAWNOW)
Most people want fast calculations so Matlab runs its calculations at
normal priority. If you are willing to give Matlab less access to the
CPU (thus increasing calculation time) you can change the priority
(how to do this depends on your operating system)
-
Jul 30th, 2003, 09:53 AM
#8
Thread Starter
Frenzied Member
Originally posted by PeteD
I seem to remember that there is a sleep() command in matlab
Since it's not in the documentation, they might have taken it out of the newer versions of MATLAB (they've done a lot of that ), but thanks .
Cander and Plenderj - Ok I'm going to ask in Gen VB then, thanks.
You just proved that sig advertisements work.
-
Jul 30th, 2003, 09:54 AM
#9
Addicted Member
-
Jul 30th, 2003, 09:55 AM
#10
Thread Starter
Frenzied Member
Originally posted by PeteD
Is this a grahics/drawing issue? If it is you could use the drawnow function (see HELP DRAWNOW)
Most people want fast calculations so Matlab runs its calculations at
normal priority. If you are willing to give Matlab less access to the
CPU (thus increasing calculation time) you can change the priority
(how to do this depends on your operating system)
Its a fairly simple situation...but I'm new to MATLAB. Sometimes I think I should have done it in VB.
All i'm doing it putting a play and a stop button. The Play button activated a loop that plays a waveform, (with wavplay()) until the user presses Stop. But the user can't press stop while the loop is running, which presents the problem. A DoEvents like function would be perfect.
You just proved that sig advertisements work.
-
Jul 30th, 2003, 09:58 AM
#11
Addicted Member
They introduced timers in one of the fairly recent versions of matlab I think.
Does your VB code interact with you matlab code? Could you put doevents in your VB code?
-
Jul 30th, 2003, 10:02 AM
#12
Thread Starter
Frenzied Member
Originally posted by PeteD
They introduced timers in one of the fairly recent versions of matlab I think.
Does your VB code interact with you matlab code? Could you put doevents in your VB code?
No no, Its all being done in MATLAB. And as far as I know, MATLAB can only interact directly with C and C++.
You just proved that sig advertisements work.
-
Jul 30th, 2003, 10:07 AM
#13
Addicted Member
I think you have to use windows messages to interact with matlab code. I'm not a matlab expert by any means, but have worked on a VB app that integrated with matlab code. A collegue did all the matlab integration work, but I'm sure he ended up posting windows messages.
-
Jul 30th, 2003, 10:15 AM
#14
Thread Starter
Frenzied Member
First of all, thanks for the help. What exactly do you mean by 'windows messages'?
You just proved that sig advertisements work.
-
Jul 30th, 2003, 10:17 AM
#15
Addicted Member
Originally posted by nishantp
First of all, thanks for the help. What exactly do you mean by 'windows messages'?
Some info here, but I'd reccomend you search google
http://www.exaflop.org/docs/vbsubclass/ind.html
have a look on www.mathworks.com, some good matlab info here
and here
http://www.mathtools.net/MATLAB/Refe.../Visual_Basic/
Last edited by PeteD; Jul 30th, 2003 at 10:21 AM.
-
Jul 30th, 2003, 02:39 PM
#16
Thread Starter
Frenzied Member
It seems that even though it had nothing to do with graphics, DrawNow() does the job. Thanks everyone.
You just proved that sig advertisements work.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|