필터 지우기
필터 지우기

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}

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by