# CONVERT VOLTAGE TO FORCE IN MATLAB CODE

조회 수: 7(최근 30일)
NGR MNFD 2021년 10월 1일
댓글: NGR MNFD 2021년 10월 2일
hello,
i have sensor which gives voltage output based on number of samples from foot force signal , the voltage signal is in y axis and samples in x axis,
i want it to change the x axis to force signal in matlab code .
plz anyone help.
number of samples are not being changed 90000 samples
i am able to plotting the acquired voltage value against 90000samples .i want the ploting for force signal (N).
##### 댓글 수: 2표시숨기기 이전 댓글 수: 1
NGR MNFD 2021년 10월 2일
hello ..
yes ,I have the foot force signal in matlab,I did not measure anything and I did not do an experiment. I only used the results of the Physion site. Now I have drawn the signal. Voltage according to the number of samples. Now I want to know with what command can I convert this diagram into a force according to the number of samples? What is the relationship between force and voltage for the foot force signal? and I want to know
How can I check the checksum of the force signal binary file? This force signal is measured by a 12-bit adc. I was able to display it through the following method.
fileID1=fopen('control1.let','r');
A= fread(fileID1, [3, 45000], 'uint8')'; % matrix with 3 rows, each 8 bits long, = 2*12bit
fclose(fileID1);
M2H= bitshift(A(:,2), -4);
M1H= bitand(A(:,2), 15);
PRL=bitshift(bitand(A(:,2),8),9); % sign-bit
PRR=bitshift(bitand(A(:,2),128),5); % sign-bit
M( : , 1)= bitshift(M1H,8)+ A(:,1)-PRL;
M( : , 2)= bitshift(M2H,8)+ A(:,3)-PRR;
N1 = reshape(M',[90000,1]); plot(N1);
Can I also check to see if it is correct or not? I do not know what code to use in MATLAB to calculate checksum? Please show me. Thank you.

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

R2019a

### Community Treasure Hunt

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

Start Hunting!

Translated by