Suppose I have a matrix A(590x133). How should I find slope of each row of the matrix A

3 ビュー (過去 30 日間)
SOURANGSU
SOURANGSU 2013 年 10 月 8 日
コメント済み: SOURANGSU 2013 年 10 月 8 日
[r,m,b]= regression(i,j);
It is not being possible to find the slope of each row using this command

回答 (1 件)

Jie
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
  1 件のコメント
SOURANGSU
SOURANGSU 2013 年 10 月 8 日
is 't' the corresponding vector you mentioned? how should I specify it?

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

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by