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.

Which Matlab function can count the time consumption of a Matlab M-script?

Status
Not open for further replies.

supiper

Member level 3
Member level 3
Joined
Jan 26, 2007
Messages
64
Helped
15
Reputation
30
Reaction score
5
Trophy points
1,288
Location
TUNISIA
Activity points
1,659
Hi all,
I need your help about a Matlab Function. I need to compute the time-consuming for Matlab M-script. Which Matlab function should I use?
 

Re: Need Matlab Function

the easiest way
tic
your stuff
ElapsedTtime = toc

you might also look at cputime

help is your friend
 

    supiper

    Points: 2
    Helpful Answer Positive Rating
Need Matlab Function

I'm also trouble with supiper's question.
And thanks for electricpete's answer. it works.
 

Re: Need Matlab Function

Also.. when u use a number of functions in ur code and u want to know the time taken in each of the function use "Profile" command..

It really rocks in the sense tht even time taken inside inbuilt funcctions are computed and displayed.
 

Re: Need Matlab Function

even you don't need any function.
Just after execution of program, Profile your code and it will show the time taken by individual function....
 

Need Matlab Function

Or better use:
t1=cputime;
t2=cputime-t1

cputime gives you the time consumed by matlab only.
tic and toc give you time in general
 

    supiper

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top