필터 지우기
필터 지우기

How do I use my data set in an equation?

조회 수: 2 (최근 30일)
Lucas
Lucas 2024년 4월 23일
답변: Walter Roberson 2024년 4월 23일
I have a 4145x6 data set collected by a fNIRS device. I need to use the formula log(Ib/Im). Ib is a mean value of 6 values, so a 1x6 data set, and Im is the 4145x6 data set. How would I solve this equation in matlab.

답변 (2개)

Torsten
Torsten 2024년 4월 23일
편집: Torsten 2024년 4월 23일
Say lm is 2x6, e.g.
lb = [1 2 3 4 5 6]
lb = 1x6
1 2 3 4 5 6
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
lm = [7 8 9 10 11 12;13 14 15 16 17 18]
lm = 2x6
7 8 9 10 11 12 13 14 15 16 17 18
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
What would you like to compute ?
[log(1/7) log(2/8) log(3/9) log(4/10) log(5/11) log(6/12);log(1/13) log(2/14) log(3/15) log(4/16) log(5/17) log(6/18)]
ans = 2x6
-1.9459 -1.3863 -1.0986 -0.9163 -0.7885 -0.6931 -2.5649 -1.9459 -1.6094 -1.3863 -1.2238 -1.0986
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
?
Then
log(lb./lm)
ans = 2x6
-1.9459 -1.3863 -1.0986 -0.9163 -0.7885 -0.6931 -2.5649 -1.9459 -1.6094 -1.3863 -1.2238 -1.0986
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
would work.

Walter Roberson
Walter Roberson 2024년 4월 23일
lb = mean(lm,1);
formula = log(lb./lm);

카테고리

Help CenterFile Exchange에서 Standard File Formats에 대해 자세히 알아보기

제품


릴리스

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by