How to set different intervals using linspace()?

조회 수: 9 (최근 30일)
Notname Notname
Notname Notname 2019년 7월 1일
답변: Aquatris 2019년 7월 1일
I want to use intervals with different range for example:
1<=x<=100 would be linspace(1,100)
but can i use linspace without including first (or last) value:
1<x<=100 ?
  댓글 수: 1
Torsten
Torsten 2019년 7월 1일
편집: Torsten 2019년 7월 1일
x = linspace(1,100);
x = x(2:end) % x = x(1:end-1)

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

채택된 답변

Aquatris
Aquatris 2019년 7월 1일
If you want to remove a certain element;
x = linspace(1,100,1e3); % 1000 elements
i = 100; % index to be removed
x(i) = []; % remove ith element
which will remove the i th element from the array.

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by