05-06-2008 01:01 AM
hello,I run your code,but some error occur:
??? Attempt to reference field of non-structure array.
Error in ==> convertTDMS at 218
ssamples=ob.(cname).nsamples;
what is the problem? I run the code under matalab r14
thank you
06-30-2008 07:25 AM
Hi!
First of all I just want to tank you for the code you attached. I have TDMS files with measurement data and corresponding time stamps for each sample and want to import this data to Matlab. Basically the same thing as you want to do, I suppose? I tried your attached code and got the following message:
??? Error using ==> fread
Invalid precision.
Error in ==> convertTDMS at 215
[data cnt]=fread(fid,nvals,LV2MatlabDataType(index.dataType(r)));
What does "invalid precision" mean here and how can I correct this? Gratetful for any help! /J
06-30-2008 08:14 AM
Ibir, Josefin,
Would it be possible for you to upload a small tdms data file that you are using? I believe (espically in Josefin's case) that this is just an issue with decoding a datatype.
Regards,
Bradh
06-30-2008 11:32 AM
07-01-2008 08:21 AM
Had a chance to look at it, and it seems to be a problem interpreting the time stamp. We figured this out when the timestamp was in the meta data, but when it is written as a channel as you have done, it seems to be causing a compatibilty issue. I have a couple of fires burning right now. Will be looking at it later today/tomorrow.
NI folks - Can you provide more information than what is in:
07-01-2008 04:56 PM
07-16-2008 09:38 AM
11-18-2008 07:15 AM
bradh,
I've used your convertor, and it is working, thanks! But there's a little problem: the data arrays don't get bigger than 1080000 and I'm losing data... any idea on how to fix that? As I'm acquiring on 2.5MHz for about 5 seconds, I would need something arround 12x10^6 arrays, and not 1.8x10^6... I've tested and Matlab does support that size...
11-19-2008 12:01 PM
Danigno,
Couple of questions:
1) I understand that you are not reciving any error messages; the script runs, but you know that data is missing. Is this true?
2) Do you know where the data is missing from? Is it itntermittant loss, or are the arrays truncated (just missing begining or ending sections)?
Regards,
Brad
11-20-2008 12:27 AM
Hi Brad, thx for the promt answer! I didn't think it would be that fast! 🙂
So, I think I found the problem at my program, when I'm still acquiring the data from LabView. I haven't solved it yet, but I don't think it is your program's problem anymore.
Well, now that you've already come here, the number I get from the timestamps... aer they in DAYs units?
Thanks a lot for your program, it is really helping me here!
Rafael