hi,
i'm new to R
i have a little script in matlab
now i'm porting it to R but i've some problem.
how can i write in R language this
matlab/octave code:
LX = L ; L is a matrix
ss = size(LX,1);
E_N_2 = zeros(ss,2);
for i = 1:ss
E_2 = E_0 + LX(i,1)*C(3)+LX(i,2)*C(4);
hi,
i'm new to R
i have a little script in matlab
now i'm porting it to R but i've some problem.
how can i write in R language this
matlab/octave code:
LX = L ; L is a matrix
ss = size(LX,1);
E_N_2 = zeros(ss,2);
for i = 1:ss
E_2 = E_0 + LX(i,1)*C(3)+LX(i,2)*C(4);
The help page for 'for' warns:
Note that it is a common mistake to forget to put braces ('{ ..
}') around your statements, e.g., after 'if(..)' or 'for()'.
In particular, you should not have a newline between '}' and
'else' to avoid a syntax error in entering a 'if
massimodisasha wrote:
hi,
i'm new to R
i have a little script in matlab
now i'm porting it to R but i've some problem.
how can i write in R language this
matlab/octave code:
LX = L ; L is a matrix
ss = size(LX,1);
E_N_2 = zeros(ss,2);
for i = 1:ss
E_2 = E_0