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

learn more… | top users | synonyms

0
votes
1answer
49 views

Finding value of (y) of logarithmic equation given (x)

I have an logarithmic equation $$\left[ r=a\,e^{b\,\theta} \right] $$ And I plot it to visualise it (see plot below). I can tell by the plot when (t=0), x1=0, y=1 (point AA) but how can I find out ...
0
votes
0answers
40 views

How to find values of non linear equations / system and solve for given values

I'm trying to find the value for the variable phase in a equation / system if amp=0.5 and freq=2.5 (note: i'm looking for several different phase values given amp and freq but this is a small ...
0
votes
1answer
42 views

Converting equation into Octave / Matlab code and a for loop

I have an array of thousands of values I've only included three groupings as an example below: (amp1=0.2; freq1=3; phase1=1; is an example of one grouping) ...
0
votes
0answers
22 views

Solving for 1 varible while missing two variables in non linear sin wave equation:

I can solve for y for the equation below but how do I go about solving for other freq(x) values? Example equation below: $$\left[ y={\it amp_1}\,\cos \left(2\,{\it freq_1}\,\pi\,t+ {\it ...
0
votes
1answer
31 views

How can I find the value of y given x using matlab / octave

I have two points on a plot point1=(40,5) and point2=(50,1) How can I find the value of y given x=42.5 I know y is 4 by looking at the plot but is there away to calculate the y value directly. I ...
1
vote
3answers
45 views

Finding when list of numbers reach periodicity given known values

I'm trying to figure out when numbers reach "periodicity" given known values. I've included an example below with image: I have known sizes (100, 75, and 50) that I would like to know how many times ...
2
votes
1answer
95 views

matrix with fractional exponent, not getting expected output in Matlab/Octave

I have a matrix exponential function that is called a number of times in an integration routine from the heat conduction model I'm trying to implement. It works, and my results match the samples in ...
1
vote
3answers
37 views

Solve for x with an expression of independent variable in the exponent

I am helping a friend in research. I wish to solve for x, in this equation. $p, k, m, l, r\text{ and }h$ are all constants. They may vary, depending on the user's input, but they would all be ...
0
votes
0answers
26 views

image plot and imshow in octave

I want to use octave in my study but when I represent the result in a figure, I see a black face. Thank you for having helped me...!
1
vote
1answer
80 views

Cholesky algorithm

Good afternoon everyone, I'm in need of a factoring algorithm cholesky and algorithms to solve upper and lower triangular systems, but I'm not finding any work in that octave. Recalling that need the ...
0
votes
1answer
36 views

Dot product of a sinusoid with a complex tone in Octave

I am trying to figure out how to solve this problem; Now make a new sinusoid with amplitude 1 and frequency 1000Hz. Calculate the dot product of this sinusoid with your complex tone using ...
0
votes
1answer
24 views

Regression project in octave/matlab

I'm trying to establish a polynomial model to adjust the variation of the dollar throughout the year. Suppose hypothetically that I have the following data ...
1
vote
1answer
43 views

Name of this type of plot? Does anyone know how to produce it

Does this type of polar plot have a name? Does anyone know how to produce it in octave 3.8.1 which is compatible with matlab? Link to site
0
votes
1answer
550 views

Eigenvectors in Matlab/Octave, function “eig()”, why are the eigenvectors output like that? [closed]

You can calculate eigenvectors of a matrix with eig() function like this: [eigenvectors, eigenvalues] = eig (matrix) But I can't manage to understand why the eigenvector output is in some kind of ...
2
votes
2answers
56 views

making a sequence of numbers in octave and matlab

I know I can make a sequence of numbers in matlab / octave using x=1:1:5 and it will give me 1,2,3,4,5 but how can I get a ...
2
votes
3answers
34 views

4-bit number to decimal number

Juts like the title says: a code to convert a 4-bit number into a decimal equivalent number without using any fucntion from octave's library. Not a clue! We consider the input a binary number ...
0
votes
1answer
41 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
94 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: ...
1
vote
2answers
82 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 note: this is an example and the amplitude ...
0
votes
1answer
686 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 ...
1
vote
1answer
211 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
137 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
76 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
118 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
121 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
418 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
542 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
683 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
254 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
94 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
103 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
175 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
576 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
2answers
114 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
779 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) ...
4
votes
2answers
855 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
3k 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
12k 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
162 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?
4
votes
1answer
4k 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?