delete or remove some value from vector

6 Ansichten (letzte 30 Tage)
Takim Mustakim
Takim Mustakim am 22 Apr. 2022
Kommentiert: Takim Mustakim am 23 Apr. 2022
wak(1)=poissrnd(60);
wk(1)=wak(1)
n=1;
while wk(n)<1000
n=n+1;
wak(n) = poissrnd(60);
wk(n) = wk(n-1)+wak(n)
end
how to delete the last value of "wk"
because the last value of "wk" more then 1000

Akzeptierte Antwort

Sam Chak
Sam Chak am 22 Apr. 2022
Perhaps you can try this to see if it is deleted.
wk(end) = []

Weitere Antworten (0)

Kategorien

Mehr zu Data Type Conversion finden Sie in Help Center und File Exchange

Produkte


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by