Suppose I have a matrix A(590x133). How should I find slope of each row of the matrix A
조회 수: 3 (최근 30일)
이전 댓글 표시
[r,m,b]= regression(i,j);
It is not being possible to find the slope of each row using this command
댓글 수: 0
답변 (1개)
Jie
2013년 10월 8일
You could use that function (or many other funs) to get your slope,but u probably could not get all the slopes at one instance. use a loop to help yourself(you also need to provide a corrisponding vector with respect to each row in ur matrix A):
A,t
[dim1, dim2]=size(A);
slope=[];
for i=1:dim1
[s1 slope_tmp s2]=regression(t,A(i,:));
slope=[slope slope_tmp];
end
slope
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!