octave

Runge-kutta for coupled ODEs

我们两清 提交于 2021-01-28 04:41:30
问题 I’m building a function in Octave that can solve N coupled ordinary differential equation of the type: dx/dt = F(x,y,…,z,t) dy/dt = G(x,y,…,z,t) dz/dt = H(x,y,…,z,t) With any of these three methods (Euler, Heun and Runge-Kutta-4). The following code correspond to the function: function sol = coupled_ode(E, dfuns, steps, a, b, ini, method) range = b-a; h=range/steps; rows = (range/h)+1; columns = size(dfuns)(2)+1; sol= zeros(abs(rows),columns); heun=zeros(1,columns-1); for i=1:abs(rows) if i=

Redefine stdout in FastCGI and Octave

倖福魔咒の 提交于 2021-01-28 02:00:30
问题 I'm working on implementing an Octave interpreter inside of an FastCGI session using C/C++ in Ubuntu Linux. The problem I'm running into is that FCGI redirects stdout to FCGI_stdout , but the precompiled Octave headers manage to still use the normal stdout which ends up in Apache's error.log instead of printed to the browser. Do any of you know a way to redirect Octave from using the system's stdout to use FCGI's stdout ? Or even just to have it redirect stdout to a file without having to

Symbolic toolbox trims final “dot” from symbol name

妖精的绣舞 提交于 2021-01-27 16:42:38
问题 I encountered weird behaviour of the symbolic toolbox of octave, where a symbolic variable ending in -dot looses the final dot -suffix. pkg load symbolic; clear, clc; syms xxxdot syms % Symbolic variables in current scope: xxxdot xxxdot % xxxdot = (sym) xxx I only stumbled upon it, because I had the same variable with and without the suffix -dot . But note that if another symbolic variable is defined without the final -dot , Octave symbolic will not merge them. So the math is still correct:

Symbolic toolbox trims final “dot” from symbol name

♀尐吖头ヾ 提交于 2021-01-27 16:31:34
问题 I encountered weird behaviour of the symbolic toolbox of octave, where a symbolic variable ending in -dot looses the final dot -suffix. pkg load symbolic; clear, clc; syms xxxdot syms % Symbolic variables in current scope: xxxdot xxxdot % xxxdot = (sym) xxx I only stumbled upon it, because I had the same variable with and without the suffix -dot . But note that if another symbolic variable is defined without the final -dot , Octave symbolic will not merge them. So the math is still correct:

Octave kernel for jupyter not working on windows 10

亡梦爱人 提交于 2021-01-27 12:22:55
问题 I tried to install the octave kernel for jupyter using pip (as suggested here https://github.com/calysto/octave_kernel). But I cannot choose the Octave kernel when creating a new notebook. It worked without problems on my Mac, so I guess it might be a Windows related issue. Does someone have any ideas, how I could fix or investigate the problem? Octave is installed. 回答1: Setting environmental variable OCTAVE_EXECUTABLE to C:\\Octave\\Octave-4.2.1\\bin\\octave-cli.exe and restarting the PC

oct2py isn't seeing OCTAVE_EXECUTABLE environment variable (Windows)

夙愿已清 提交于 2021-01-27 06:02:59
问题 So, I'm trying to use oct2py on Windows, like so: from oct2py import octave That's literally the only code I need to reproduce the error. When I execute this, I get OSError: Octave Executable not found, please add to path or set"OCTAVE_EXECUTABLE" environment variable . However, I have already set OCTAVE_EXECUTABLE as a system variable, which points to "C:\Octave\Octave-4.4.1\bin\octave-cli-4.4.1.exe" . Opening up the command line and running %OCTAVE_EXECUTABLE% gives me the Octave CLI, so I

Why theta*X not theta'*X in practical?

狂风中的少年 提交于 2021-01-27 05:35:14
问题 While doing MOOC on ML by Andrew Ng, he in theory explains theta'*X gives us hypothesis and while doing coursework we use theta*X . Why it's so? 回答1: In mathematics , a 'vector' is always defined as a vertically-stacked array, e.g. , and signifies a single point in a 3-dimensional space. A 'horizontal' vector, typically signifies an array of observations, e.g. is a tuple of 3 scalar observations. Equally, a matrix can be thought of as a collection of vectors. E.g., the following is a

Installation of octsympy of Octave: error even after OK sympref diagnose

心不动则不痛 提交于 2021-01-07 02:41:42
问题 I am finding problems with the installation of the symbolic package octsympy of Octave. I have GNU Octave Version 5.2.0 under Windows 10. I have python3 installed with Anaconda. I have followed the following steps: Download the file symbolic-2.9.0.tar.gz . Install with pkg install symbolic-2.9.0.tar.gz . pkg load symbolic . setenv PYTHON C:\Users\...\Anaconda3\python . sympref diagnose . After the last command, I receive the message: Your kit looks good for running the Symbolic package.

Installation of octsympy of Octave: error even after OK sympref diagnose

我的梦境 提交于 2021-01-07 02:40:53
问题 I am finding problems with the installation of the symbolic package octsympy of Octave. I have GNU Octave Version 5.2.0 under Windows 10. I have python3 installed with Anaconda. I have followed the following steps: Download the file symbolic-2.9.0.tar.gz . Install with pkg install symbolic-2.9.0.tar.gz . pkg load symbolic . setenv PYTHON C:\Users\...\Anaconda3\python . sympref diagnose . After the last command, I receive the message: Your kit looks good for running the Symbolic package.

Octave: How to turn a vector of integers into a cell array of strings?

我们两清 提交于 2021-01-07 02:39:10
问题 In Octave: Given a vector a = 1:3 How to turn vector "a" into a cell array of strings {'1','2','3'} (Output of this:) ans = { [1,1] = 1 [1,2] = 2 [1,3] = 3 } ( question end ) Further information: my aim is to use a as the input of strcat('x',a) to get ans = { [1,1] = x1 [1,2] = x2 [1,3] = x3 } Other solutions how to reach this aim are welcome, but the main question is about getting an array of strings directly from a vector. This question is a follow-up from cell array, add suffix to every