Remove a column from a matrix in GNU Octave

In case you don’t know the exact number of columns or rows you can use the magic “end” index, e.g.: mymatrix(:,2:end) % all but first column mymatrix(2:end,:) % all but first row This also allows you to slice rows or columns out of a matrix without having to reassign it to a new variable.

Cost Function, Linear Regression, trying to avoid hard coding theta. Octave.

You can use vectorize of operations in Octave/Matlab. Iterate over entire vector – it is really bad idea, if your programm language let you vectorize operations. R, Octave, Matlab, Python (numpy) allow this operation. For example, you can get scalar production, if theta = (t0, t1, t2, t3) and X = (x0, x1, x2, x3) … Read more

Plot window not responding

The problem is likely to be the graphics toolkit which your installation of Octave is using. To check this, type graphics_toolkit in the Octave command line. If the response is fltk and your plot window is freezing, then switch the default toolkit to gnuplot: graphics_toolkit(‘gnuplot’) Test that the problem is fixed: x=1:10; y=x.^2; plot(x,y) Make … Read more

Why/when should I prefer MATLAB over Octave?

In 2008 I tried doing the same thing. I quickly noticed the following show stoppers: Toolboxes are not as complete and not as well tested. Particularly the image processing toolbox that my work relied heavily upon (the big show stopper was that imtransform was not implemented). The Octave debugger and profiler were primitive compared to … Read more

cocktail party algorithm SVD implementation … in one line of code?

I was trying to figure this out as well, 2 years later. But I got my answers; hopefully it’ll help someone. You need 2 audio recordings. You can get audio examples from http://research.ics.aalto.fi/ica/cocktail/cocktail_en.cgi. reference for implementation is http://www.cs.nyu.edu/~roweis/kica.html ok, here’s code – [x1, Fs1] = audioread(‘mix1.wav’); [x2, Fs2] = audioread(‘mix2.wav’); xx = [x1, x2]’; yy … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)