octave

How exactly enable 64 bit indexing in Octave on Windows 7(64 bit)

半城伤御伤魂 提交于 2019-12-12 16:12:29
问题 I know this is an old topic. But still after exhausting search on Google I have no clue. I was fallowing along with Deep Learning tutorial on http://deeplearning.stanford.edu/tutorial/. On that tutorial in the SoftMax regression section I need to read 4704000 bytes( i.e images = fread(fp, 28*28*30000, 'uchar'). The script is working but too slow. Octave Using at most 500mb. I found that we should allow 64 bit indexing(https://www.gnu.org/software/octave/doc/interpreter/Compiling-Octave-with

How to read large matrix from a csv efficiently in Octave

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 11:00:55
问题 There are many reports of slow performance of Octave's dlmread . I was hoping that this was fixed in 3.2.4, but when I tried to load a csv file that has a size of ca. 8 * 4 mil (32 mil in total), it also took very, very long time. I searched the web but could not find a workaround for this. Does anybody know a good workaround? 回答1: I experienced the same problem and had R handy, so my solution was to use "read.csv" in R, and then use the R package "R.matlab" to write a ".mat" file, and then

How to add vectors with different length?

谁说我不能喝 提交于 2019-12-12 08:41:05
问题 I would like to add two vectors with different lengths in Matlab or Octave. E.g. aa = [1 2 3 4]; bb = [100 100]; Which should result in a vector cc containing cc = [101 102 3 4] Can anyone figure out how to do this? Update: This is the code I ended up with for the signals that I then later convert to grey scale images. load train; t = y; load chirp; c = y; tc = c + [t; zeros(length(c) - length(t),1)]; plot(1:length(tc),tc) Thank you very much to you all =) 回答1: This doesn't make any sense

Using octave headless

风流意气都作罢 提交于 2019-12-12 08:39:58
问题 Is there a possibility to use Octave headless. Something like this octave < "5+4" >result.txt 回答1: Using octave --silent --eval 5+4 > result.txt you'll get ans = 9 in result.txt . See octave --help for details about command-line arguments. Yet, there is this infamous ans = that might be remove using sed , e.g. octave --silent --eval 'x=5+4; y=x+1; disp(y)' | sed -e 's/ans = //' >> result.txt which add the appropriate result ( 10 ) in result.txt . It should not be too hard to wrap this into a

Installing octave package in ubuntu

余生颓废 提交于 2019-12-12 07:26:19
问题 anyone can help me with this error? octave:4> pkg install signal-1.2.0.tar.gz error: the following dependencies where unsatisfied: signal needs optim >= 1.0.0 signal needs specfun >= 0.0.0 signal needs control >= 2.2.3 signal needs general >= 1.3.2 octave:4> pkg install optim-1.2.2.tar.gz error: the following dependencies where unsatisfied: optim needs miscellaneous >= 1.0.10 optim needs struct >= 1.0.10 octave:4> pkg install struct-1.0.10.tar.gz make: /usr/bin/mkoctfile: Command not found

Finding zero crossing that are going positive and zero crossing that are going negative

≡放荡痞女 提交于 2019-12-12 07:17:44
问题 I have a signal that I would like to copy when it: 1) starts at zero crossing going positive 2) copy a set number of points (like 8000) 3) and after the 8000 points are copied continue appending points until a zero crossing going down section is found. I can find the zero crossing but I'm having some issues with knowing how to tell when there is a zero crossing going positive and/or a zero crossing going negative. I'm also having trouble with adding the next section of points after the 8000

How Can I add Octave in PATH environment variable in Windows 8?

烈酒焚心 提交于 2019-12-12 07:01:49
问题 I would like to add Octave in my PATH environment variable. Is there a lineguide like the following? http://www.java.com/en/download/help/path.xml 回答1: Suppose you installed Octave in a folder myOctave , and the path to it is myPath which may be something like C:\Program Files\ . Then, you could launch the cmd of your windows, and type the following set PATH=%PATH%;myPath\myOctave\bin Here is a detailed example based on my own Octave path and directory. My Octave is installed here E:\Programs

scale() R function equivalent in Octave/Matlab

 ̄綄美尐妖づ 提交于 2019-12-12 06:46:06
问题 Avoiding loops, is there a way to center a matrix of data around the mean of the columns (or rows), scaling each entry by the standard deviation (also column-wise or row-wise)? In R this is easy: scale(data, center = T, scale = T)) . But I don't know how to achieve the same basic pre-processing in Ocatave or Matlab. 回答1: There isn't a single function that does this but you can use the dim parameter for std and mean to accomplish this. We can also use bsxfun to wrap it all into one line. A =

Creating 2-D Pulse in Octave

只谈情不闲聊 提交于 2019-12-12 06:11:59
问题 I want to create a 2-D pulse in Octave. It will consist of a box in the middle with value 1.0 and 0.0 outside. The size of the 2-D array is 512. How can I do this in Octave? 回答1: Given the width and height of this box stored in width and height , and assuming that they are both odd for symmetry, it's very simply: row_half = floor(height/2); col_half = floor(width/2); pul = zeros(512,512); pul(256-row_half:256+row_half, 256-col_half:256+col_half) = 1; The first two lines of code determine what

fsolve error: no function or method found

强颜欢笑 提交于 2019-12-12 05:40:09
问题 I wrote this code in octave: syms z; f=z-2; fsolve("f",0.) Then this gives the error @f: no function and no method found. Also using fsolve(@f,0) gives the same error When I write code as: syms z; f=z-2; fsolve(f,0.) Then this gives the error ind2sub: subscript indices must be either positive integers less than 2^31 or logicals. Please explain to me how to actually use fsolve . 回答1: % syms z; % Not needed, actually slows down the code f=@(z)(z-2); fsolve(f,0.) You're missing the @ symbol,