How to store R Square values in seperate matrix from different regression ?
1 回表示 (過去 30 日間)
古いコメントを表示
Hi,
I am plotting 17 different regression plots. So, I have 17 different 17 R_square values. Now I want to store R_Square values in the matrix - 1 row , 17 columns or vice a versa.
Currently I tried following R1 = num2str(STATS(1),3), so on up to 17 R Square values then try to create array or matrix as below
[xR] = [R1 R2 R 3.......R17] save ' xR.mat' xR but this stores as "ans" not as array I tried xR = {R1, R2, R3, ....R17} --- it creates the array but does not create the matrix. --- I may add more regression plots so instead of putting R Square values in array manually. I would like to use loop or if command to store the R_Square values in matrix.
is there any good way to store these R_Square values using loop or if ?
4 件のコメント
回答 (1 件)
Muhammad Usman Saleem
2016 年 4 月 18 日
編集済み: Muhammad Usman Saleem
2016 年 4 月 19 日
For single row and 17 column, try this one
xR = [R1; R2; R3;R4;R5;....;R17] ;
This create a matrix 1*17.
What is nature of R1? whether it is vector or some scaler?
According to my understanding of your kind question, You are looking something like this
R1=rand(1,3) %random vector order(1,3)
R1 =
0.9134 0.6324 0.0975
R2=rand(1,3)
R2 =
0.1419 0.4218 0.9157
>> R3=rand(1,3)
R3 =
0.7922 0.9595 0.6557
Now making a matrix of R1,R2,R3
xR=[R1;R2;R3]
xR =
0.9134 0.6324 0.0975
0.1419 0.4218 0.9157
0.7922 0.9595 0.6557
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Descriptive Statistics についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!