Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to test the speed of a m-file execution?

Status
Not open for further replies.

Xellos

Newbie level 5
Joined
Jan 6, 2005
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
84
test speed of a m-file?

In what situation, you can get a fast result of running a program once.

Thx.
 

test speed of a m-file?

If you would to know how long a m-file is executed, you can do as follows:

TimeStart = cputime; % At the beginning of the m-file
TimeConsumed = cputime-TimeStart; % At the end of the m-file
 

Re: test speed of a m-file?

Hi,
you need to
1) avoid declaring new variable in a loop.
2) avoid indexing that grows in a loop
3) predefine arrays with zero
4) use LUTs
hope this helps
brmadhukar
 

test speed of a m-file?

thanks a lot!

Added after 4 hours 40 minutes:

another question please!
how can matlab calculates with uint8 data?
I know it can only tell one uint8 number bigger than another uint8. Can it do the addition with uint8 numbers.

or if compile m-file to a c++ program, will it be faster? if so, how to test the speed of a c program?

thanks for your time!!!
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top