フィルターのクリア

How to assign value to a variable depending on another array?

4 ビュー (過去 30 日間)
Iugo
Iugo 2021 年 2 月 27 日
コメント済み: Iugo 2021 年 3 月 1 日
Hi everyone!
My code allows the user to choose between 16 folders, with each folder having this amount of files [15 23 24 33 36 36 37 39 41 44 48 59 61 75 113 169], noting that there are 2 folders with the same number of files. Since I'm dealing with fMRI time-series points, each folder will have a specific repetition time (TR), which will be [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, after choosing the folder, calculate the sampling frequency (fs=1/TR) for that selected folder. How can I get the TR, based on the number of files for any eventually selected folder?
Thanks in advance!
  12 件のコメント
Walter Roberson
Walter Roberson 2021 年 3 月 1 日
If the data is available somehow, you could create a TR.mat inside each directory that had the appropriate TR for the directory stored inside it.
Iugo
Iugo 2021 年 3 月 1 日
Thank you both for your replies!!
I will do what Walter mentioned, create a TR.mat for each folder to store those values that I need for posterior calculations.

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by