similar to: Converting code from MATLAB to R

Displaying 20 results from an estimated 3000 matches similar to: "Converting code from MATLAB to R"

2005 Jun 24
3
Counterpart for Matlab's 'feval'?
Hi! I've just begun writing a program that searches for the minimum of a function with golden section search. In order to do this in a nice way I need a function that takes a function name and an argument and returns the function value for that argument, i .e just like Matlab's 'feval'. Is there any? Thanks before hand! Best regards, Fredrik Thuring, Codan Insurance A/S
2007 Sep 24
1
Root finding problem
Hello, I have a problem finding a root of a function, which I define like this: tuki <- function(u, x, a, lambda){ if((lambda%%1>0) & u<0) {u<-(u+0i)} f <- Re(x-(a*(u)^lambda-(1-(u))^lambda)/lambda) f } What I want to do is to find the root, but without specifying the interval within which to search for it. I can do it easily in MATLAB with fsolve() or fzero() functions. I
2012 Oct 22
1
Matlab code to R code
Dear r-users, I would like to convert my Matlab code to R-code, however it dies not work as expected.  Hope somebody can help me to match Matlab and r codes. R code: rr <- function(r,cxn) { tol <- 1E-4; for(i in 1:n) { t1 <- (1+(i-1)*r)*log((1+(i-1)*r)) t2 <- (i-1)*(1-r)*log(1-r) rri <- ((t1+t2)/i*log(i))-cxn rr <- rri > tol } round(rr,4) } rr1 <- rr(0.5,0.0242) ; rr1
2008 Jul 19
2
How to solve systems of nonlinear equations in R?
Hey, I was wondering if there existed a R function similar to 'fsolve' or 'fzero' Matlab functions? Thanks! Francois Aucoin [[alternative HTML version deleted]]
2015 Nov 29
2
[PATCH] bios/fan: hardcode the fan mode to linear
This is an oversight that made use of the trip-point-based fan managenent on cards that never expose those. This led the fan to stay at fan_min. Fortunately, the emergency code would kick when the temperature would reach 90°C. Reported-by: Tom Englund <tomenglund26 at gmail.com> Tested-by: Tom Englund <tomenglund26 at gmail.com> Signed-off-by: Martin Peres <martin.peres at
2003 Sep 29
2
Solving nonlinear system equation
Hi all, I would like to ask that is there any function in R which can solve nonlinear system equations with several variables. Thats mean some functions similar to the 'fsolve' or 'fzero' in matlab. Thanks you Jerry _________________________________________________________________ Get 10Mb extra storage for MSN Hotmail. Subscribe Now!
2016 Jan 04
2
[PATCH] bios/fan: hardcode the fan mode to linear
On 17/12/15 19:18, Martin Peres wrote: > > > On 29/11/15 16:10, Martin Peres wrote: >> This is an oversight that made use of the trip-point-based fan >> managenent on >> cards that never expose those. This led the fan to stay at fan_min. >> >> Fortunately, the emergency code would kick when the temperature would >> reach >> 90°C. >>
2016 Jan 05
2
[PATCH] bios/fan: hardcode the fan mode to linear
On 04/01/16 18:42, Emil Velikov wrote: > On 4 January 2016 at 14:56, Martin Peres <martin.peres at free.fr> wrote: >> On 17/12/15 19:18, Martin Peres wrote: >>> On 29/11/15 16:10, Martin Peres wrote: >>>> This is an oversight that made use of the trip-point-based fan managenent >>>> on >>>> cards that never expose those. This led the fan
2005 May 01
3
Roots of quadratic system.
Hello, I have a system of quadratic equations (results of a Hamiltonian optimization) which I need to find the roots for. Is there a package and/or function which will find the roots for a quadratic system? Note that I am not opimizing, but rather solving the first order conditions which come from a Hamiltonian. I am basically looking for something in R that will do the same thing as fsolve in
2007 Aug 22
2
gWidgets (tcltk): problem extracting values from widgets in glayout grid
Hello, I haven't been able to find an example for the second case below -- or perhaps I didn't recognize it when I saw it. Is there a value for x such that svalue(x) will return "bbb", either by itself or as part of an array? Or do I need to do something else entirely? (R2.5.1; Windows XP) > #### gWidgets test > options("guiToolkit"="tcltk") >
2005 Jun 08
2
Solve f(x) = 0
Hi! I´m need a function that solves the equation f(x) = 0 (i.e. the root of the function) when f is a nonlinear function. Is there any? I´ve tried nlm and optim on the square of the function but the solution is very unstable. Thanks before hand. / Fredrik Thuring ------------------------------------------------------------------------------ This e-mail and any attachment may be confidential
2011 Apr 14
1
Using GSL Routines
Dear R-programmers, I am trying out certain methods in R, and the statistics require me to calculate n-(sample size) dimensional equations. They are not really very hard to solve - my home-brew implentation of Newton-Raphson in R succeeds most of time with simulated data. (Note that I am assured of a unique solution by theory). Problem comes in with real data, for which I should really implement
2007 Jun 26
4
Looking for parallel functionality between Matlab and R
I'm slowly moving my statistical analysis from Matlab to R, and find myself missing two features: a) How do I mimic Matlab's 'hold on'? (I want to show several plots together, when I type two plots one after the other the second overwrites the first) b) How do I mimic Matlab's 'axis'? (after drawing my plots I want to zoom on specific parts- for example, x=0:5,
2005 Nov 16
3
yay for zfs
This zfs looks great! I really hope this gets put into solaris soon since I don''t think I could live with Solaris express on a production machine. The easy of adding disk and moving directories looks like a life saver, especially for me who deals with trying to store digital media which piles up a couple of gig a day! This message posted from opensolaris.org
2014 Sep 17
10
[Bug 83992] New: [NVE0][NVF1] regression, linux 3.17 causes gpu lockups
https://bugs.freedesktop.org/show_bug.cgi?id=83992 Priority: medium Bug ID: 83992 Assignee: nouveau at lists.freedesktop.org Summary: [NVE0][NVF1] regression, linux 3.17 causes gpu lockups QA Contact: xorg-team at lists.x.org Severity: critical Classification: Unclassified OS: Linux (All) Reporter:
2009 Jan 30
3
Matlab inv() and R solve() differences
I submit the following matrix to both MATLAB and R x= 0.133 0.254 -0.214 0.116 0.254 0.623 -0.674 0.139 -0.214 -0.674 0.910 0.011 0.116 0.139 0.011 0.180 MATLAB's inv(x) provides the following 137.21 -50.68 -4.70 -46.42 -120.71 27.28 -8.94 62.19 -58.15 6.93 -7.89 36.94 8.35 11.17 10.42 -14.82 R's solve(x) provides: 261.94 116.22 150.92 -267.78 116.22 344.30 286.68
2009 Feb 20
2
equivalent function to MatLab 'step' ?
I have to admit I don't fully understand how MatLab's step() function works, but I'm learning that part. Can someone point me to equivalent&related functions in R? thanks Carl
2007 Nov 17
3
R and reading matlab compressed files
Is there any way to read these files (standard .mat files, created by matlab version 7 onwards are compressed)? I know that R.matlab doesn't read them (it even says in the file MatlabServer.m "Matlab v7 saves compressed files, which is not recognized by R.matlab's readMat()" (lines 47-8)). I know I should be able to make R call Matlab and transfer data (not that I managed to
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
2007 Apr 17
0
Drobo
Here''s another product which has removed the hassle out of disk management: <http://www.drobo.com/products_demo.aspx> I wonder if they (Data Robotics) will make the Drobo work with ZFS once Leopard is out (since it supports HFS+)? ---8<--- Data Robotics has just introduced Drobo, the world?s first storage robot. Drobo is a direct attached storage array that provides