フィルターのクリア

Find index of value in array

3 ビュー (過去 30 日間)
Iugo
Iugo 2021 年 2 月 22 日
コメント済み: Star Strider 2021 年 2 月 23 日
Hello everyone!
I have two vectors: vect_number_subjects, each position is the number of subjects in a specific folder, and vect_TR, which is the respetive Repetition Time (TR) for those subjects in each folder. The variable number_subjects is the total of subjects present in the folder to be analyzed.
number_subjects = length(dirFicheiroMat);
vect_number_subjects = [15 23 24 33 36 36 37 39 41 44 48 59 61 75 113 169];
vect_TR = [2.2 2.5 1.5 2 1.5 2 2 2.5 3 2 2 1.6 2 3 2 2];
I want to perform a for loop that allows me to calculate the sampling frequency (1/TR) automaticaly, based on the number of subjects present in the folder to be analyzed in that particular moment.
I appreciate any ideas to solve this problem.
Thanks in advance

採用された回答

Star Strider
Star Strider 2021 年 2 月 22 日
It is not obvious to me how the number of subjects and the repitition time interact, however it is unlikely that a loop is necessary in any event.
See if this does what you want:
vect_number_subjects = [15 23 24 33 36 36 37 39 41 44 48 59 61 75 113 169];
vect_TR = [2.2 2.5 1.5 2 1.5 2 2 2.5 3 2 2 1.6 2 3 2 2];
Fs = vect_number_subjects ./ vect_TR;
.
  5 件のコメント
Iugo
Iugo 2021 年 2 月 23 日
Star Strider
Star Strider 2021 年 2 月 23 日
As always, my pleasure!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatched Filter and Ambiguity Function についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by