How to store R Square values in seperate matrix from different regression ?

1 visualización (últimos 30 días)
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 comentarios
Rahul Panchal
Rahul Panchal el 18 de Abr. de 2016
one row but 17 singe cell columns like R1 R2 R3 ...R17 or one single columns with 17 rows like R1 R2 R3

Iniciar sesión para comentar.

Respuestas (1)

Muhammad Usman Saleem
Muhammad Usman Saleem el 18 de Abr. de 2016
Editada: Muhammad Usman Saleem el 19 de Abr. de 2016
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

Categorías

Más información sobre Descriptive Statistics en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by