How do I create a time vector? Im supposed to create a time vector so that I can plot a seismogram
my sampling frequency is 40 Hz a
the sample interval in in a file called sachdr.delta
it starts at 0 seconds
I just don't understand how to include all of these parameters in to make the time vector work. I am going to plot this time vector as the x variable is and the amplitdue (y variable) is called utahz.

4 件のコメント

Hakan Sagir
Hakan Sagir 2020 年 12 月 15 日
Can you transfer your variables to excel or matlab(variable table) from your file ?
Cielo Martos
Cielo Martos 2020 年 12 月 15 日
I was able to look at the file and it only contains the number 0.025
I tried:
Fs = 40;
Ts = 1/ 40;
ts = 0:Ts:0.0250;
and then
plot(ts,utahz) but it threw me an error saying that the vectors were not the same length
Hakan Sagir
Hakan Sagir 2020 年 12 月 15 日
1/40 = 0.025 already,
if you try to get the vector,
your code is like this ts = 0:0.250:0.0250
it already gives you the vector ts = [0 0.0250] only 2 variables
you have something wrong in your data or you get it wrong maybe :)
Cielo Martos
Cielo Martos 2020 年 12 月 15 日
I looked at how many reading the utahz vector had (80683) then I multiplied that by 0.0250
tl = linespace(0,2017.075,80683)
plot(tl,utahz)
Thank you!

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

 採用された回答

Cris LaPierre
Cris LaPierre 2020 年 12 月 15 日

0 投票

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeSeismology についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by