フィルターのクリア

subtract two data points in a cell array

1 回表示 (過去 30 日間)
Bharat
Bharat 2014 年 12 月 5 日
コメント済み: Bharat 2014 年 12 月 5 日
Hi. I have a cell array Sa (338 X 1929). I want to subtract two points (which are numbers). For example: Sa(i,2)-Sa(i-1,2). Matlab doesn't do that as they are cell array type. Is there any way to do this?
  1 件のコメント
Image Analyst
Image Analyst 2014 年 12 月 5 日
After you read the FAQ you will know all about cells and won't need to ask a question like this. See http://matlab.wikia.com/wiki/FAQ#What_is_a_cell_array.3F I think it gives a good intuitive description for what cells are an how to use them. Then you will understand why the cyclists answer works.

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

採用された回答

the cyclist
the cyclist 2014 年 12 月 5 日
You are trying to subtract the cells, rather than the contents of the cells. Try
Sa{i,2}-Sa{i-1,2}
  1 件のコメント
Bharat
Bharat 2014 年 12 月 5 日
Thanks man!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeResizing and Reshaping Matrices についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by