필터 지우기
필터 지우기

C3D Help

조회 수: 1 (최근 30일)
federico valenti
federico valenti 2011년 3월 21일
I had a C3D file and I need the sample rate from that
this is the code that i used:
server=c3dserver % create a c3d server
openc3d(server) % open a c3d file
XYZPOS=get3dtargets(server) % get the targets and store'em in a struct
VT1=[XYZPOS().T1] % store the displacements in a vector from every channel
VT2=[XYZPOS().T2];
VT3=[XYZPOS().T3];
VT4=[XYZPOS().T4];
VF4=[XYZPOS().F4];
VF3=[XYZPOS().F3];
VF2=[XYZPOS().F2];
VF1=[XYZPOS().F1];
VM1=[XYZPOS().M1];
VM2=[XYZPOS().M2];
VM3=[XYZPOS().M3];
VM4=[XYZPOS().M4];
VACC_1=[XYZPOS().ACC_1];
VACC_2=[XYZPOS().ACC_2];
VACC_T=[XYZPOS().ACC_T];
VACC_2=[XYZPOS().ACC_2];

채택된 답변

Jan
Jan 2011년 3월 21일
Do you want the sample rate only?
FID = fopen(C3DFileName, 'r');
fssek(FID, 20, 'bof');
Rate = fread(FID, 1, 'float32');
fclsoe(FID);
If you want to use c3dserver, what does the documentation state for getting the frame rate?!
  댓글 수: 2
federico valenti
federico valenti 2011년 3월 22일
read below ;-)
TY
federico valenti
federico valenti 2011년 4월 11일
thanks you were very kind

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

federico valenti
federico valenti 2011년 3월 22일
i'll explain you the entire question:
i don't know c3d and matlab at all. My teacher gave me a c3d file and i have to create an ascii file with 4 columns T X Y Z (T is a simple time's vector from the trial). For X, Y and Z I stored them in vectors (how you can read above) now I need the vector T
about the code you wrote i typed
>> FID = fopen(C:\Documents and Settings\federico\Documenti\MATLAB\C3D\SINT3-07.c3d, 'r');
and the matlab anwers was
??? FID = fopen(C:\Documents and Settings\federico\Documenti\MATLAB\C3D\SINT3-07.c3d, 'r'); | Error: Unexpected MATLAB operator.
  댓글 수: 1
Jan
Jan 2011년 3월 23일
You need quote characters for the string:
FID = fopen('C:\Documents and Settings\federico\Documenti\MATLAB\C3D\SINT3-07.c3d', 'r');

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Seismology에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by