Displaying 20 results from an estimated 1000 matches similar to: "Analog to matlab repmat function"
2001 Jul 10
0
speeding up aperm/ adding repmat
Hi,
I have noticed that aperm is very slow, and I wondered if there was a
way of speeding it up.
Let me tell you a bit about the context of my problem, because perhaps
I shouldn't be using aperm at all.
The context is probabilistic inference in
graphical models. One of the most fundamental operations is two
compute an element-wise multiplication of two arrays of different
sizes, say A and B.
2004 Sep 28
2
S4 method selection based on second argument
I'm translating some Matlab code and need some help figuring
out how to change this call into an S4 generic method.
In matlab, there's a function called 'repmat' with three
calling sequences (all I have to deal with anyway):
1) B = repmat(A, m, n)
2) B = repmat(A, [m n])
3) B = repmat(A, n)
In all cases, A is the fill value, m is number of rows,
and n is number of
2011 Nov 02
4
array manipulation
Hello,
I'm at the very beginning of the learning process of this language.
Sorry in advance for the (possible but plausible) stupidity of my question.
I would like to find a way to permute the DIMENSIONS of an array.
Something that sounds like the function "permute()" in matlab.
Given an array C of dimensions c x d x T , for instance, the command
permute(C, [2 1 3])
would provide
2006 Aug 20
3
plot problem
Hello.
I'm pretty much new to R and I'm trying to produce some figures.
It seems to me, that R has some asynchronous way of plotting figures.
When I run this code:
#constructs the semivariogram of SC1929
vgm1 <- variogram(SC1929~1,~U+V,puerto.map$att.data)
# trying to make new plot
dev.set(which=dev.next())
plot(vgm1)
title(main="Semivariogram",font.main=4)
2009 Feb 05
2
Non-linear optimisation
Hi there,
I have a piece of Matlab code I use to optimise a trding strategy. If there
are any Matlab/R specialists out there, I would appreciate your help in
doing the exact same optimisation in R.
I suspect I would use nlm() in R but am not sure where to define my
constraints.
I have attached my Matlab code below for reference.
Many thanks.
Constraints
function [c,ceq]=TriskellConstraints(X)
2005 Oct 13
3
Help with Matrix package
Hello all,
A colleague at work set me the challenge to convert some MATLAB
code into R, to see which is faster. We'd seen that benchmark comparing
MATLAB 6.5 to R1.90 (and others), and so I thought that I should be able
to get roughly comparable speeds. The code has lots of multiplications
of matrixes, transposes, and MATLAB's "repmat". I did the code
conversion, and R was about
2002 Jan 03
6
Graphical representation of a matrix ?
Hi,
The function Repmat under S allows to represent a matrix of data.
Is there an equivalent function under R ?
thanks for your reply
Bruno
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not
2014 Nov 17
2
[LLVMdev] [llvm][SelectionDAG] trivial patch: fix misprint in SelectionDAGLegalize::ExpandInsertToVectorThroughStack
Alright, go ahead with it.
—Owen
> On Nov 17, 2014, at 4:58 AM, Daniil Troshkov <troshkovdanil at gmail.com> wrote:
>
> Hi!
>
> I have not found test case. (It is because we have no target using "ExpandInsertToVectorThroughStack").
> But I tested it for target currently not included in llvm trunk.
>
> This fix correct and trivial, so I'm offering
2014 Jun 03
3
[LLVMdev] [LLVM Doc] tblgen backends
I agree, but I have no experience with LLVM doc.
The job is very simple: add link at page
https://github.com/draperlaboratory/fracture/wiki/How-TableGen%27s-DAGISel-Backend-Works
into doc page
http://llvm.org/docs/TableGen/BackEnds.html
But how I can do it?
On Tue, Jun 3, 2014 at 4:41 PM, Renato Golin <renato.golin at linaro.org>
wrote:
> Hi Daniil,
>
> Those look great! I think
2014 Nov 12
2
[LLVMdev] [llvm][SelectionDAG] trivial patch: fix misprint in SelectionDAGLegalize::ExpandInsertToVectorThroughStack
I detected this bug using test case from platform which is not currently
supported on llvm targets. (Our team is porting llvm on new target).
Creating the test case will take some extra time. I'll try to do it ASAP.
Have you any ideas about the test case? (targets using
ExpandInsertToVectorThroughStack, etc...)
On Wed, Nov 12, 2014 at 8:29 PM, Owen Anderson <resistor at mac.com> wrote:
2024 Feb 27
2
converting MATLAB -> R | element-wise operation
Why anything but sweep?
The fundamental data type in Matlab is a matrix... they don't have vectors, they have Nx1 matrices and 1xM matrices.
Vectors don't have any concept of "row" vs. "column". Straight division is always elementwise with recycling as needed, and matrices are really vectors in row-major order:
1 2 3
4 5 6
is really
1 4 2 5 3 6
and when you do
2013 Mar 05
1
boxplot with frequencies(counts)
Dear All,
I have a table as following
position type count
1 2 100
1 3 51
1 5 64
1 8 81
1 6 32
2 2 41
2 3 85
and so on
Normally if would have a vector of 2,3,4,5... by position position and
plot them by position.
But now i have counts of these types.
Is there a way to compute boxplot of such
2006 Nov 30
1
analog to the matlab buffer function?
Hello!
I am new to R. I could not find a function analogous to matlab's function buffer, which is used in signal processing. Is there such a function in R?
What I need to do is as follows. If I apply the function to the vector c(1:5) for example with a window length 3 and overlapping 2, I need to get a matrix like this:
1 2 3
2 3 4
3 4 5
In matlab this is achieved with the function buffer. Is
2016 Mar 21
2
transfer FSMO roles from Windows DC
I have the Active Directory domain with Windows 2008 R2 domain controller and Samba domain controller on CentOS 7. Samba is 4.3.5 (self-compiled). Forest and domain levels are Windows 2008 R2.
After joining Samba to the domain as the domain controller there were no DC=ForestDnsZones and DC=DomainDnsZones records on "OUTBOUND NEIGHBORS". I fixed it with ntdsutil, as it's written here
2014 Jun 03
2
[LLVMdev] [LLVM Doc] tblgen backends
Hi all!
There is doc about tglben backends:
http://llvm.org/docs/TableGen/BackEnds.html
May be should to add link at
https://github.com/draperlaboratory/fracture/wiki/How-TableGen%27s-DAGISel-Backend-Works
I remember when I first met the LLVM it would be very useful.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2006 Jun 09
1
Idempotent apply
Dear all,
I have been working on an idempotent version of apply, such that
applying a function f(x) = x (ie. force) returns the same array (or a
permutation of it depending on the order of the margins):
a <- array(1:27, c(2,3,4))
all.equal(a, iapply(a, 1, force))
all.equal(a, iapply(a, 1:2, force))
all.equal(a, iapply(a, 1:3, force))
all.equal(aperm(a, c(2,1,3)), iapply(a, 2, force))
2015 Jul 14
2
[LLVMdev] [llvm] [libunwind] r207467 misprint
Hi Nick!
In r207467 you added code(libunwind: DwarfInstructions.hpp):
assert(lastReg <= (int)cieInfo.returnAddressRegister
&& "register range does not contain return address
register");
for (int i = 0; i <= lastReg; ++i) {
.....
else if (i == (int)cieInfo.returnAddressRegister)
There is misprint here: lastReg should be >=
2004 Jan 27
1
iRiver iMP-550
Hi everyone!
I've just bought subj and updated the firmware to the 1.50b (beta) version. It
plays ogg vorbis files, but only in a 96..256kbps range. That sucks because
unfortunately almost every album of my music collection is encoded at q=9.2,
and several bits, on the contrary, are encoded at very low bitrates like
60-80 kbps :(
Well I can always reencode when I have time, but can
2010 Dec 27
1
aperm() should retain class of input object
aperm() was designed for multidimensional arrays, but is also useful for
table objects, particularly
with the lattice, vcd and vcdExtra packages. But aperm() was designed
and implemented before other
related object classes were conceived, and I propose a small tune-up to
make it more generally useful.
The problem is that aperm() always returns an object of class 'array',
which
2007 May 07
1
looking for equivalent of matlab's medfilt1 function
Dear all,
I have several files with Matlab code, which I am translating to R.
For the zero-level approach, I took the very old shell script from R-help
archives, which has made some obvious leg-work such as replacement of "="
with "<-".
Now I am translating indexing, matrix operations and function call using
this table
http://37mm.no/mpy/octave-r.html
The problem is, I