nano second
Show older comments
I am still confused about the access time on the order of nano second.how matlab can have accurate time in order of nano second.
Accepted Answer
More Answers (3)
Walter Roberson
on 5 Apr 2011
3 votes
Perhaps I need to word this even more strongly:
You cannot do the timing that you are hoping to do within MATLAB itself. MATLAB is not a suitable language for precision timing.
It appears that you are probably thinking of using signals in the UHF band, 300–1000 MHz, especially with your earlier reference to missile detection. There is no built-in MATLAB facility that would allow you to time events accurately enough to use even HF band, 3–30 MHz. The highest resolution you can use within MATLAB itself is 1 KHz.
Pierre
on 5 Apr 2011
1 vote
At first I have to admit that everything I'll state now is pure mostly speculation and I don't have any reliable resources for this.
I don't think the nano second values you gather do reflect anything useful:
At first, I'd like to point out, that if a clock has got a nano second resolution, this does not mean it's got a nano-second accuracy. The clock might be accurate in µs, although it counts 1000 "nano-seconds" during one µs. But one of those tics might last for 1.5 real nano-seconds, another one only 0.5 nano-seconds, statistically, the clock becomes accurate at µs-level.
Second, a Matlab-script being interpreted, running on a virtual machine in a multi-threaded environment will provide you nonsense values even at µs level... the only reliable time-measure which is independent from other stuff running on your machine should be the CPU-time consumed by your script... but I'm not sure you can recover these. (If you can, we agree that a CPU clocked at 10?Hz has CPU-cycles lasting 1/10? s ;) .)
1 Comment
Paskah Nainggolan
on 7 Apr 2011
Walter Roberson
on 5 Apr 2011
1 vote
You cannot accurately measure nano-second resolution times in MATLAB itself. You may be able to read nano-second resolution times as data time stamps from an instrument, or if you are using code generated by the Real Time Workshop on a standalone PC target running at 1 GHz or more, you maybe be able to read the hardware cycle counters.
You should completely give up on the idea that now() or clock() or tic() or toc() will be able to provide you with meaningful nano-second-level information.
4 Comments
Paskah Nainggolan
on 7 Apr 2011
Walter Roberson
on 7 Apr 2011
I find the supported hardware for that listed at http://www.mathworks.com/products/target-package/prev_requirements_ti.html#1
I see at least 8 board families listed there. I do not think I have time to research the available options and configuration parameters for each of those board families.
Paskah Nainggolan
on 13 Apr 2011
Walter Roberson
on 19 Apr 2011
Millisecond is the highest resolution that one can expect using the standard MATLAB facilities such as clock() . What can be obtained on a stand-alone system using one of the Target Support packages is a different question and I don't know the answer to that. If you pick a *particular* board and *particular* Analog To Digital convertor (ADC) then I can google the specifications, but I am not going to spend my time researching all the available ADC for all 8 of the supported board families.
My recommendation would be that you find an ADC that does time-stamping *at the ADC*, and then the question merely becomes one of whether a reasonable system can handle the data transfer rate you would like to use.
Categories
Find more on Data Acquisition Toolbox Supported Hardware in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!