How to set different intervals using linspace()?

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 日

0 投票

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

カテゴリ

ヘルプ センター および File ExchangeCreating and Concatenating Matrices についてさらに検索

タグ

質問済み:

2019 年 7 月 1 日

回答済み:

2019 年 7 月 1 日

Community Treasure Hunt

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

Start Hunting!

Translated by