필터 지우기
필터 지우기

How to get interval value between values inside array?

조회 수: 30 (최근 30일)
Prasanth Warrier
Prasanth Warrier 2020년 11월 11일
댓글: Ameer Hamza 2020년 11월 11일
I have an array created with this command
t = [0:0.01:0.99 1:0.1:9.9 10:1:100];
this creates 281 columns
I want to know difference between each columns
like time interval between 2nd and 1st colulmn and between 2nd and 3rd like wise.
How do i go about it?

채택된 답변

Ameer Hamza
Ameer Hamza 2020년 11월 11일
Use diff()
t = [0:0.01:0.99 1:0.1:9.9 10:1:100];
dt = diff(t);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by