vector

2 次查看(过去 30 天)
lowcalorie
lowcalorie 2012-5-12
i have a vector
X = [.00000;.00001;.00002;.00003;.00004;.00005;.00006;.00007;.00008;.00009;];
i need to do X/(X-1) value not 1 the number
(x-1) needs to equal a value to the left of X
example .00002/.00001
  1 个评论
Image Analyst
Image Analyst 2012-5-12
Realize that X(2)/X(1) will work but its value will be inf (infinity).

请先登录,再进行评论。

回答(1 个)

Oleg Komarov
Oleg Komarov 2012-5-12
Manually:
X(2:end)./X(1:end-1)

类别

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

标签

Community Treasure Hunt

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

Start Hunting!

Translated by