[R] Translation of matlab vectors code into r
Haio
joakim.aback at gmail.com
Sun May 6 13:07:07 CEST 2012
Hi there
I am new user of r, i would need some help to translate som code for vectors
in matlab to r. I have managed to translate the first 7 rows, but not the
rest. Could anyone give me any suggestions for this problem??
Matlab code:
tempo=[];
temps=[];
tempn=[];
tempao=[];
tempas=[];
tempan=[];
for k=1:5
tempo = [tempo n_o(k,:)];
temps = [temps n_s(k,:)];
tempn = [tempn n_n(k,:)];
tempao = [tempao nanst_o(k,:)];
tempas = [tempas nanst_s(k,:)];
tempan = [tempan nanst_n(k,:)];
end.
This is the code that i´m trying to translate into r, so far i have managed
to translate the first 7 rows into r, but not last 6 rows.
R-Code:
tempao= vector()
tempas= vector()
tempan= vector()
tempao= vector()
tempas= vector()
tempan= vector()
for (k in 5:1)
?
?
?
?
?
?
--
View this message in context: http://r.789695.n4.nabble.com/Translation-of-matlab-vectors-code-into-r-tp4612656.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list