Azzera filtri
Azzera filtri

How to convert all vector elemens into zeros but not the maximum and the minimum of it?

2 visualizzazioni (ultimi 30 giorni)
Hey
How to turn v into zeros and just keep the maximum and the minimum alement?
% Generate v
n=[1,5];
v=unifrnd(-1, 5, n);
% Remove Direct Dublications
v = v([true, diff(v)~=0]);

Risposta accettata

darova
darova il 20 Mag 2020
Try this modification

Più risposte (0)

Categorie

Scopri di più su Creating and Concatenating Matrices in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by