How to set different intervals using linspace()?

19 ビュー (過去 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 2019 年 7 月 1 日
x = linspace(1,100);
x = x(2:end) % x = x(1:end-1)



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 件)


Community Treasure Hunt

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

Start Hunting!

Translated by