octave

Export struct to .csv

纵然是瞬间 提交于 2019-12-12 03:16:50
问题 In Octave I have a large "struct" called "semi_firm" with 19 "rows" (my language might be completely wrong and confusing, believe me it's more confusing for me than for you :) and dimension 1x1. (I'm thinking about this the way I imagine it looks in Excel, so why something massive has a 1x1 dimension is completely beyond me). Some cells in the structure contain a single value, some contain multiple. I extract the following: out = struct("pnum", semi_firm.Patent_Number, "class", semi_firm

oct2py in Anaconda/Spyder not recognizing octave

試著忘記壹切 提交于 2019-12-12 02:13:41
问题 Windows7 Anaconda/python ver 3.4 Octave ver 4.0.3 OCTAVE_EXECUTABLE = C:\Users\Heather\Octave-4.0.3\bin Hi all, I've been working a few days on trying to get oct2py working in Anaconda using Spyder. I was wondering if anyone could tell me the correct way to get it to work in Spyder on a windows machine? Basic setup maybe or maybe I'm using the wrong packages? So far I've installed the oct2py package per the Anaconda Cloud using: conda install -c conda-forge oct2py=3.5.9 In all the

MATLAB/OCTAVE- Numerical integration of an integrand containing terms obtained from numerical solution of a system of ODE

荒凉一梦 提交于 2019-12-12 01:37:52
问题 I want to calculate the following integral on Octave(or Matlab): However, I don't have an explicit expression for H and K. The H and K are actually numerical solutions of the following differential equations. The initial conditions of h,k, dh/dr, and dk/dr are 0,1,1/2,0 respectively. How do I go about doing this? Can I solve it directly somehow, or do I need to find the numerical solutions to H and K first, find a polynomial approximation, and then integrate? I am completely new to Matlab and

Trivial/impossible algorithm challenge in Octave/Matlab - iterations memory

自闭症网瘾萝莉.ら 提交于 2019-12-11 20:29:15
问题 There is an input vector with allowed set of values {-2,-1,0,1,2} , e.g. input = [2 2 2 2 0 1 0 -1 0 -2 -2 -1 0 1] Vector is scanned iteratively from start to end and at each point a certain transition table is realized, based on the current value of the vector, and a certain accumulated value determined by previous iterations. This value is incremented/decremented by a requested step (3 here) up to the top value (9 here) beyond which it cannot go. The output vector represents certain ongoing

Difference between async and sync in octave?

天大地大妈咪最大 提交于 2019-12-11 19:23:02
问题 I was having issues with the editor in octave and posted an question before: Octave output buffer completely messed up on OS X. How to fix? The way how I fixed the question is using edit mode sync instead of the default async . However, I don't really understand what's the difference between async and sync here? And why when using async the keyboard was sending signals to both octave and the editor so that the output buffer gets messed up? If possible, can we use async mode for macbook?

reformulating for loop with vectorization or other approach - octave

点点圈 提交于 2019-12-11 19:13:12
问题 Is there any way to vectorize (or reformulate) each body of the loop in this code: col=load('col-deau'); %load data h=col(:,8); % corresponding water column dates=col(:,3); % and its dates %removing out-of-bound data days=days(h~=9999.000); h=h(h~=9999.000); dates=sort(dates(h~=9999.000)); [k,hcat]=hist(h,nbin); %making classes (k) and boundaries of classes (hcat) of water column automatically dcat=1:15; % make boundaries for dates for k=1:length(dcat)-1 % Loop for each date class ii=find

Octave script through php windows

空扰寡人 提交于 2019-12-11 19:08:25
问题 I am trying to run an octave script through PHP. I already googled and found some results but none of them are working for me. I tried with exec() and system(). I even created a batch file which calls 'octave myScript.m" and called this bat file using system() of PHP but it doesnt seem to work. In the browser page I am just seeing 'C:/FOLDER_PATH>octave myScript.m". The octave script simply creates a new file and writes some text to it. When i directly run the bat file (by double-clicking on

Porting OCTAVE C++ to iOS

微笑、不失礼 提交于 2019-12-11 18:17:24
问题 i'd been surfing the web for several hours finding always the same sites and no real answer to my query. Here's the thing, i'd like to port some of the Octave functions to a iPad/iPhone app. i'd already tried to mix C++ with Obj-C and it works like a charm BUT i haven't been able to find the right source of OCTAVE to compile at least the very core of it, i did download the source code from sourceforge.net but i'd had seen some fortran and some other languages classes but not c++ classes. Does

alternating and shifting sections of an array

做~自己de王妃 提交于 2019-12-11 17:06:59
问题 I have a n x m array (could be any size array but it will not be a 1 x m) and I want to rotate / shift each square loop individually no matter the array size. How can I alternate the rotation / shift each square loop no matter the size of the array. Please note: I'm not trying to calculate the values in the array but shift the values. My thought process was to get the values of each "square loop" and place them into one row and do a circshift then place them back into another array. I ran

Ploting dates on x-axis in octave: “error: __plt2vv__: vector lengths must match”

我只是一个虾纸丫 提交于 2019-12-11 16:15:53
问题 I'm trying to plot 3 lines on the same figure with dates on X-axis . I can do it perfectly on without having dates on x-axis but when I try to put years on x-axis I get this error : error: __plt2vv__: vector lengths must match I'm not familiar with MATLAB and this is my first tiral , here is the part of my code where I try to plot : data = importdata('2.txt'); C = data.data.'; C = C'; N = length(C); H = 12; w = ones(2 * H + 1, 1); Lambda_Tilde = NaN * zeros(N, 1); L_Tilde = NaN * zeros(N, 1);