Displaying 2 results from an estimated 2 matches for "bsxfun".
Did you mean:
bfun
2009 Mar 03
2
R - MATLAB apply like function
...pply", for speedup purposes. I am now also using MATLAB, and would like to use the same kind of function.
I have already asked MATLAB people, and the answer is : "vectorize"... but of course, this is not always possible. So, instead of using
a FOR loop all the time, I tried using the bsxfun. So you R people, who might also use MATLAB, do you have any solution? Are you also nervous
about this fact (maybe also because of this R-MATLAB question).
Thanks for your help,
Dave
[[alternative HTML version deleted]]
2013 Feb 07
0
Help R.matlab
...5a537b7.mat"
Received cmd: 1
"eval" string: "
Tr = TrA(INF,:).* IHo;
Susc = SHo * Sc;
myKS = ones(N,1);
myKS(find(moveBan > 0),1) = KernelShrinkage;
myKS = gpuArray(myKS);
dMG = gpuArray(dM(:,INF));
K1G = exp(-kparShort*(dMG));
K1G = bsxfun(@times, myKS,K1G);
K2G = exp(-kparLong*(dMG));
K2G = bsxfun(@times, myKS,K2G);
FoIG=Susc.*((K1G*(Tr(:,1)+Tr(:,2)+Tr(:,3))) + (K2G*Tr(:,4)));
ProbI = 1-exp(-FoIG);
res = gather(ProbI);
"
Sent byte: 0
Received cmd: 1
"eval" string: "variables = {...