What can I do for this Matrix manipulation
Info
This question is closed. Reopen it to edit or answer.
Show older comments
I have two types of matrix (29*1 and 168*1). K: 29*1, R: 168*1
The values of K represent specific n-th row of R. And I'd like to take values of R corresponding to K values. In the end, I should have this matrix, R'(29*1) from R(168*1).
What can I do for that?
4 Comments
Rik
on 4 Jun 2019
It is not entirely clear to me what you mean. This is my best guess:
rate(k)
Also, I would change your code a bit in a few places:
number=unique(B(:,1));
tn=numel(number);
initial=rand(1,3);
rate=zeros(tn,1);R2_value=zeros(tn,1);
ft = fittype('a*exp(-x/b)+c');
for i=1:tn
current=ismember(B(:,1),number(i));
[F,gof2] = fit(B(current,2),B(current,3),ft,'StartPoint',initial);
rate(i) = 1/F.b;
R2_value(i)=gof2.rsquare;
end
k=find(R2_value>0.7)
Jaehwi Bong
on 4 Jun 2019
Edited: Jaehwi Bong
on 4 Jun 2019
Rik
on 4 Jun 2019
Is this what you mean?
R2_value(k)
You're making it confusing by not explaining what you mean with a small example.
Jaehwi Bong
on 5 Jun 2019
Answers (0)
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!