Filter löschen
Filter löschen

select first 15 from ans

1 Ansicht (letzte 30 Tage)
Kiruthiga Sekar
Kiruthiga Sekar am 26 Apr. 2019
Beantwortet: Star Strider am 26 Apr. 2019
Hi,
When I execute a particular function, it produces 70 values in ans. But i want only first 15 values stored in a array variable. How do I do it?
TIA

Akzeptierte Antwort

Star Strider
Star Strider am 26 Apr. 2019
It appears that you are calling the function without an output assignment.
Call it as:
v = theFunction(x);
then:
v = v(1:15);
to keep only those elements you want.

Weitere Antworten (0)

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Produkte


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by