How to set different intervals using linspace()?

11 vues (au cours des 30 derniers jours)
Notname Notname
Notname Notname le 1 Juil 2019
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 commentaire
Torsten
Torsten le 1 Juil 2019
Modifié(e) : Torsten le 1 Juil 2019
x = linspace(1,100);
x = x(2:end) % x = x(1:end-1)

Connectez-vous pour commenter.

Réponse acceptée

Aquatris
Aquatris le 1 Juil 2019
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.

Plus de réponses (0)

Catégories

En savoir plus sur Creating and Concatenating Matrices dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by