editing a variable

I have a 1x50 structured array. However, there is only values in the last 10 cells.
Is it possible to turn this into a 1x10 structured array and how?

Antworten (3)

Rick Rosson
Rick Rosson am 6 Aug. 2011

0 Stimmen

Please try:
Y = X(41:50);
OR:
Y = X(end-9:end);
HTH.
Rick
Fangjun Jiang
Fangjun Jiang am 6 Aug. 2011

0 Stimmen

Or X(1:end-10)=[]
James
James am 6 Aug. 2011

0 Stimmen

Thanks all!

1 Kommentar

Oleg Komarov
Oleg Komarov am 6 Aug. 2011
Please accept the answer you feel best answered your needs.

Diese Frage ist geschlossen.

Tags

Gefragt:

am 6 Aug. 2011

Geschlossen:

am 20 Aug. 2021

Community Treasure Hunt

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

Start Hunting!

Translated by