Change the frequency of an array

조회 수: 3 (최근 30일)
farzad
farzad 2020년 11월 27일
댓글: farzad 2020년 11월 28일
Hi All
I have an array (time) which will be combined with another and will create a signal. before I do the combination, I want to define an input parameter, that will be the frequency of this time array. so if the time array is 30 seconds and has a frequency of 100 Hz, I want to give the parameter freq=200Hz and arrange the array members in order that the time array becomes 15 seconds.
how would I do this

답변 (1개)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2020년 11월 27일
According to you exercise statement, this one works ok.
f = input('Enter time frequency value: ');
t0=0; dt = 1/f; tend = 3000/f;
t = t0:dt:tend;
  댓글 수: 2
farzad
farzad 2020년 11월 27일
thank you ,well the thing is , I know the length of the original array, and only by changing the frequency, I need to form it without knowing the end value of the new time array
farzad
farzad 2020년 11월 28일
this does not work always : please see the next question
if I drop every one element and double the frequency with respect to the original , it does not work

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

카테고리

Help CenterFile Exchange에서 Matched 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