필터 지우기
필터 지우기

cost funtion between observed and measured .

조회 수: 1 (최근 30일)
Cecilia Masemola
Cecilia Masemola 2013년 11월 11일
답변: David Sanchez 2013년 11월 11일
I have two matrices of different size and would like to calculate cost funtion between observed and measured . As I search through I came across the following fnction Diff=measured-observed.^2,2).Can somebody explain this fuction for me. What does 2 just after the exponent do?I would appreciates some explanation. Thanks in advance

답변 (1개)

David Sanchez
David Sanchez 2013년 11월 11일
From Matlab documentation:
In general, diff(X) returns the differences calculated along the first non-singleton (size(X,dim) > 1) dimension of X.
Y = diff(X,n) applies diff recursively n times, resulting in the nth difference. Thus, diff(X,2) is the same as diff(diff(X)).

카테고리

Help CenterFile Exchange에서 Import, Export, and Conversion에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by