how to produce interval from this matrix?

1 回表示 (過去 30 日間)
uncung fgv
uncung fgv 2012 年 11 月 23 日
Columns 1 through 6
0 0.1131 0.2134 0.3023 0.3812 0.4512
0 0.2134 0.3812 0.5132 0.6171 0.6988
0 0.3023 0.5132 0.6604 0.7631 0.8347
0 0.3812 0.6171 0.7631 0.8534 0.9093
0 0.4512 0.6988 0.8347 0.9093 0.9502
0 0.5132 0.7631 0.8847 0.9439 0.9727
0 0.5683 0.8136 0.9195 0.9653 0.9850
i want interval between column 2 and 1
column 3 and 2
column 4 and 3
column 5 and 4
column 6 and 5
and then i want
the result of those interval devided each other like:
interval column 3 and 2/ interval column 2 and 1
interval column 4 and 3/ interval column 3 and 2
interval column 5 and 4/ interval column 4 and 3
and soon
  2 件のコメント
per isakson
per isakson 2012 年 11 月 23 日
Azzi, I guess "so on". However, what does OP mean by "interval"?
uncung fgv
uncung fgv 2012 年 11 月 24 日
sorry my native not english. interval in my mind is determination or different-ial. like 6 and 4 the 'interval'= 2 (minus)

サインインしてコメントする。

採用された回答

Matt J
Matt J 2012 年 11 月 24 日
編集済み: Matt J 2012 年 11 月 24 日
Here's a wild guess at what you mean
diff(A(:,2:end),1,2)./diff(A(:,1:end-1),1,2)
  4 件のコメント
Matt J
Matt J 2012 年 11 月 24 日
編集済み: Matt J 2012 年 11 月 24 日
A little more efficiently, then
temp=diff(A,1,2);
out=temp(:,2:end)./temp(:,1:end-1);
uncung fgv
uncung fgv 2012 年 11 月 24 日
many thanks. gratefull i know this site.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by