select first 15 from ans

1 次查看(过去 30 天)
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

采纳的回答

Star Strider
Star Strider 2019-4-26
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.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by