For questions about Octave, a high-level interpreted language for numerical computations.

learn more… | top users | synonyms

0
votes
1answer
18 views

Simulating a controlled dynamical system

I am try to simulate a controlled dynamical system of the form $$\dot{x}=f(x,\phi(x)),$$ where $\phi$ is the controller. To do so, I am using Octave (an open source version of Matlab). My commands ...
0
votes
1answer
24 views

Linear regression using gradient descent in Octave seems to fail

I was trying to implement linear regression with gradient descent using the equation presented on the machine learning course on Coursera: ...
0
votes
0answers
11 views

Finding where plots may cross with octave / matlab

I have several data points that are plotted below and I would like to find the frequency value when the amplitude value crosses 4. I've included an example along with the data points in the example ...
0
votes
1answer
47 views

Numerically Integrate Matrix Equation in Matlab / Octave

How do I integrate a matrix numerically in Octave / Matlab? I am trying to do the following integration numerically in Matlab $\int_a^b T(x)^{-1} B dx$ where $T(x)$ returns an 8x8 matrix. The ...
-3
votes
1answer
54 views

Efficiently entering long polynomials in Octave. [closed]

Question: I have the following polynomial, $$1 + x^{20} + x^{40} + x^{60}$$ for a generating functions chapter in a book I'm reading. The problem now is that I'd like to enter this to octave, but as ...
0
votes
0answers
20 views

Eigenvalues and fft of sound trying to find similarities

I'm looking at sound resonance patterns using matlab/octave to see if there may be patterns between FFT and Eigenvalues. I can get the frequencies and each of the frequencies amplitude to recreate ...
1
vote
1answer
70 views

How to draw contour lines (projections) on axis x or y with octave?

With the builtin function contour(x,y,z) of octave one can draw level curves where z remains constant. My question is how to draw contour lines on axis x or axis ...
0
votes
1answer
62 views

GNU Octave draw figure of 2 planes

How can I draw two planes in same figure in GNU Octave? $$ x + y + z = 1\\ 2x - y + 3z = 4$$ Thanks!
0
votes
1answer
62 views

converting a signal back and forth with trigonometric functions

I'm trying to convert a signal back and forth using trigonometric functions. In the example below: 1) start off with a cos signal 2) convert the signal to a secant signal 3) would like to convert ...
0
votes
3answers
102 views

Calculate the number of times an angle must be repeated for it to complete a full rotation and for it to close

I'm trying to calculate the number of times an angle must be repeated to make a full rotation and become closed. Example: The internal angle of a pentagon is 108 degrees and it must repeat 5 times to ...
1
vote
1answer
67 views

M-matrix check in Matlab/Octave?

Is there a simple way to check that matrix is M-matrix in Octave/Matlab? Thanks, Vojta
-1
votes
1answer
216 views

Plot using surf/mesh command in GNU octave

I want to plot a 3D plane in GNU Octave using the surf/mesh command. I have following data e.g a= [ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17]; b= [ 0.001 ...
1
vote
3answers
239 views

PCA analysis on 1D set of observations

There are lots of discussions on the web about Principal Component Analysis (PCA) and how to use tools such as matlab octave for that. However none of them fit my problem. My problem is that I have ...
1
vote
1answer
461 views

How to plot multinomial beta from Dirichlet Distribution

I would like to plot the multinomial beta from the Dirichlet Distribution wiki page. $$\mathrm{B}(\alpha) = \frac{\prod_{i=1}^K \Gamma(\alpha_i)}{\Gamma\bigl(\sum_{i=1}^K ...
4
votes
1answer
190 views

Computing $e^x$ in Octave using only +,-,*,/,^.

I have to write a function in Octave which is computing e^x. I wrote this: ...
1
vote
2answers
84 views

Why are the inverse results not equal?

I mat a problem when solving inverse of a matrix. Firstly, I use python numpy library to make it, by coding below: ...
-1
votes
1answer
88 views

How to reduce precision in Octave? [closed]

I want to round the actual value of a variable to a certain precision point. Example: .3333333333333 to .3333300000000 (rounding to .00001) Is this possible?
1
vote
2answers
172 views

Solve $x^2(1-x) = 1$

I have a problem $x^2(1-x) = 1$ This can be simplified ( I think ) to $-x^3 + x^2 - 1 = 0$ Google shows that there is 1 solution for this in its graph. I am not sure how to get to that solution ...
1
vote
2answers
447 views

Using Octave to solve systems of two non-linear ODEs

How to solve following system of ordinary differential equations using Octave? $$\frac{dx}{dt} = - [x(t)]^2 - x(t)y(t)$$ $$\frac{dy}{dt} = - [y(t)]^2 - x(t)y(t)$$ Update: initial conditions: ...
0
votes
1answer
90 views

How to get PI based results in Octave?

In Octave octave.exe:4> asin(1/2) ans = 0.52360 is it possible to get the result in form of: ans = pi/6 It seems not ...
1
vote
3answers
547 views

Plotting an integral of a function in Octave

I try to integrate a function and plot it in Octave. Integration itself works, i.e. I can evaluate the function g like g(1.5) ...
3
votes
2answers
650 views

Reconstructing space curves from its curvature and torsion

I have to write a program which gets two functions (curvature and torsion) and 3 vectors of the Frenet-Serret "frame" at the starting point - and I have to reconstruct the space curve from this given ...
1
vote
1answer
2k views

Making sense out of plotting 3D graphs in octave/matplotlib

Recently I have a few times I wanted to plot 3D graphs in some applications (tried matplotlib and octave), noticing similar syntax, but I don't understand what it does so its hard to modify it ...
3
votes
1answer
9k views

Is there a symbolic math package for octave?

I am using Octave (3.6) on Ubuntu 10.0.4 LTS. I want to do some research involving symbolic math. I was thinking of downloading sage (I just found about it today) - but thought I'd better ask in here ...
0
votes
2answers
155 views

Solving $X^{T}Xw = X^{T}y$ for $w$ in Octave / MATLAB

I have a matrix $X$ and a vector $y$, how do I solve the following equation for $w$: $$ X^{T}Xw = X^{T}y $$ in Octave and/or MATLAB?
0
votes
1answer
2k views

Increasing precision of Octave

I notice the values I get from octave are rounded to 5 decimal places. How can I increase that to 6 or 8 for example?