chop a 1-D vector

1 次查看(过去 30 天)
Nadia
Nadia 2012-6-28
How do I cut the first 2 samples of 1-D vector has 1000 samples in Simulink?

回答(2 个)

ScottB
ScottB 2012-6-28
z = rand(1000,1);
a = size(z)
z(1:2) = [];
b = size(z)

K E
K E 2012-6-28
编辑:K E 2012-6-28
If you want to select the third through last values of your vector within Simulink, you can use the Selector block. If you want to remove the first two elements prior to importing the data into your Simulink model, see ScottB's answer.

类别

Help CenterFile Exchange 中查找有关 Modeling 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by