/r/octave

Photograph via snooOG

Subreddit for discussing topics and questions related to GNU Octave.

Now back open for business!

GNU Octave is a high-level interpreted language, primarily intended for numerical computations. It provides capabilities for the numerical solution of linear and nonlinear problems, and for performing other numerical experiments. It also provides extensive graphics capabilities for data visualization and manipulation. The Octave language is quite similar to Matlab so that most programs are easily portable.

Related Subreddits

/r/octave

1,627 Subscribers

1

audioplayer function doesn't work with multitrack audio

I'm using gnu octave to generate audio. I tried to use the audioplayer function with 4 and 8-track arrays, but it doesn't play the audio on 4 or 8 output channels. Even in 9.2.0 this doesn't work. I cannot find any information about this problem. With mono or stereo arrays everything is fine. If you have experience with this problem, please tell me. I tried it on Mac OSX Ventura, but also on windows11 it doesn't play the four tracks. I have tested the settings of my 8-track audiocard the AUDIO-configuration (on mac) and I can play 4 or 8-track files with quicktime. In the documentation multitrack audio is explicitly mentioned:

https://preview.redd.it/55mzqul4jiyd1.png?width=609&format=png&auto=webp&s=1dc670435d0f4c9ea898cf6ad4d31bda53c96679

Here is my script:

% Define audioproperties

samrat=44100;

bitrat=16;

% Create audio array

t=4; %seconds

tt=(1:(samrat*t))./samrat;

tone1=[sin(2*pi*200*tt) tt*0 tt*0 tt*0];

tone2=[tt*0 sin(2*pi*300*tt) tt*0 tt*0];

tone3=[tt*0 tt*0 sin(2*pi*400*tt) tt*0];

tone4=[tt*0 tt*0 tt*0 sin(2*pi*500*tt)];

toneA=[sin(2*pi*200*tt) tt*0];

toneB=[tt*0 sin(2*pi*400*tt)];

% This one work perfectly

toneout2=[toneA;toneB]';

% This one doesn't work.

toneout4=[tone1;tone2;tone3;tone4]';

% Call player

player = audioplayer (toneout4, samrat, bitrat);

play (player);

If you have an idea how to solve this problem or experience with this function your reactions are highly appreciated.

4 Comments
2024/11/02
16:13 UTC

1

I wan to plot a free-falling curve based on the tabular data,but an error is reported

https://preview.redd.it/eui8rsu3gbxd1.png?width=400&format=png&auto=webp&s=f789ffd8e45f893a6703bbc3dd8ae6d7b39e5f42

https://preview.redd.it/bjoca3v9gbxd1.png?width=355&format=png&auto=webp&s=949e78b73d3294a8ffd7bc1f71387b7ad634eee1

https://preview.redd.it/68gdfa2bgbxd1.png?width=1407&format=png&auto=webp&s=124e3620a26fd0e1f98dd75b327cff6c2a2477c7

x=linspace(0,2.5,6)

y=-16*x^2+100

but the command window says error:for x^y,only square matrix arguments are permitted and one argument must be scalar. Use ^for elementwise power.

As an absolute newbie,I think there should be nothing wrong with it from a mathematical expression perspective.

2 Comments
2024/10/27
15:31 UTC

2

metoda polovljenja

a=-1.5;

b=-1;

f=@(x)sqrt(x+2)-2*cos(x);

tol=1e-3;

n=15;

format long

%Komentar

if f(a)*f(b)>=0

error("Los unos")

end

xTacno=fzero(f,[a,b]);

xMin=-1.6;

xMAx=-0,9;

X=linspace(xMin,xMax,1000);

Y=f(x);

plot(X,Y,'b');

hold on

plot(xTacno,0,'r',MarkerSize',5);

plot(a,0,'b.',MarkerSize',5)

plot(b,0,'b.',MarkerSize',5)

%fplot(f,[a,b])

plot([xMin,xMax],[0,0],'k');

xlim([xMin,xMax]);

grid on

for i=0:n

x=(a+b)/2;

plot(x,0,'y.','MarkerSize',5)

pause(1)

fprintf('%d:x=%.7f/n',i,x);

if abs(f(x))<tol

break

end

if f(a)*f(x)<0

b=x;

else

a=x;

end

xOld=x;

plot(xOld,0,'k','MarkerSIze',5)

end

hold off

1 Comment
2024/10/22
22:58 UTC

2

need help with error

https://preview.redd.it/ktoywjf1nxtd1.png?width=693&format=png&auto=webp&s=1ca946a4bf97eb3476123da6b6236c61a6ffb5a7

I'm trying to run a code I found but this error is getting in the way, any tips?

this is the code I'm running:

% Program to form Admittance Bus Matrix

function ybus = ybus(); % Returns ybus

e = actxserver('Excel.Application'); % First, open an Excel Server.

eWorkbook = e.Workbooks.Add;

e.Visible = 1; % Insert a new workbook.

eSheets = e.ActiveWorkbook.Sheets; % Make the first sheet active.

eSheet1 = eSheets.get('Item', 1);

eSheet1.Activate;

A = ['PLEASE FILL THIS EXCEL SHEET WITH JUST THE VALUES IN THIS ORDER FROM RIGHT HERE- START FROM FIRST COLUMN FIRST ROW. DONT FORGET TO SAVE IT'];

B=['Column 1- From Bus number. Column 2- To Bus number. Column 3- Resistance(R). Column 4- Reactance(Z). Column 5- Group Admittance(Y/2)'];

eActivesheetRange = e.Activesheet.get('Range', 'A1');

eActivesheetRange.Value = A;

eActivesheetRange = e.Activesheet.get('Range', 'A2');

eActivesheetRange.Value = B;

%Displaying message

eWorkbook.SaveAs('E:\myfile.xlsx'); % Saving the file

clc;

fprintf('\n\t The data has been stored');

y=input('\n Press 1 to view Y Bus matrix for the above');

if(y==1)

linedata = xlsread('myfile'); % Calling linedata for Line Data

fb = linedata(:,1); % From bus number

tb = linedata(:,2); % To bus number

r = linedata(:,3); % Resistance, R

x = linedata(:,4); % Reactance, X...

b = linedata(:,5); % Shunt Admittance, B/2

z = r + i*x; % Z matrix

y = 1./z; % To get inverse of each element

b = i*b; % Make B imaginary

nbus = max(max(fb),max(tb)); % no. of buses

nbranch = length(fb); % no. of branches

ybus = zeros(nbus,nbus); % Initialise YBus

% Formation of the Off Diagonal Elements

for k=1:nbranch

if fb(k) > 0 & tb(k) > 0

ybus(fb(k),tb(k)) = ybus(fb(k),tb(k)) - y(k);

ybus(tb(k),fb(k)) = ybus(fb(k),tb(k));

end

end

% Formation of Matrix

for m=1:nbus

for n=1:nbranch

if fb(n) == m | tb(n) == m

ybus(m,m) = ybus(m,m) + y(n) + b(n);

else,

end

end

end

ybus; % Bus Admittance Matrix

end

3 Comments
2024/10/10
13:42 UTC

2

How can I fix octave to work on my phone?

Is it just me or is Octave on android wrong?

a few days ago I bought octave in the playstore my phone is an OppoA57 and when I try to open the application tells me error and exits the app, leaving the app insersible and a great feeling of helplessness because I use it for vector analysis classes.

https://preview.redd.it/r54c8jmlu5nd1.png?width=429&format=png&auto=webp&s=cebb2e2b15cce253af73fe5a6615f00a92492a80

1 Comment
2024/09/06
09:48 UTC

1

Help, I can't download octave and I only have a week to do it because of university.

How can I download octave on my compuradora, I try to do it on the official GNU page and it tells me that the connection is expired, nothing is downloaded, the screen appears as if there is no wifi even though there is.

https://preview.redd.it/2mmuo6i4u5nd1.png?width=429&format=png&auto=webp&s=1e920cece623e28f5cdb51fdcaebffd89bf54f33

1 Comment
2024/09/06
09:45 UTC

1

Command Window - Spurious characters after updating

Does anybody know whats going on here? All other tabs work, just the command window displaying spurious characters. Have been running old Octave 5.2 no issues, tried 9, then worked backwards to 6, still get this, but fine on 5? Am running Windows 7 with latest updates (no desire to use windows 10 with forced updates & restarts on a machine dedicated to running modelling & analysis 24/7)

https://preview.redd.it/f2f4h52x6gmd1.png?width=1712&format=png&auto=webp&s=43c4871c475e9876b8c95f2e3fed54d9c0a6f028

8 Comments
2024/09/02
19:30 UTC

3

New release (1.7.0) of the Statistics package

Happy to announce the latest release (1.7.0) of the Statistics package for GNU Octave. See the release notes [here](https://github.com/gnu-octave/statistics/releases/tag/release-1.7.0).

0 Comments
2024/09/01
08:20 UTC

2

Cleaner Presenatation

https://preview.redd.it/4fzrvb894nid1.png?width=499&format=png&auto=webp&s=be1e8f9147221c3045a8038cb1d108f7c14f576e

I have written a program that basically does a fork load of math so I don't have to. Right now I am having it display each row of the matrix as it writes it with

disp(data(Row));

Is there a way to get it to display less information. I'd ideally just want

Construction_Angle = x

Construction_Line = y

https://preview.redd.it/pw23kwbx4nid1.png?width=1482&format=png&auto=webp&s=83f19a3ada8095cc0e8c980d8c33cfde98b70979

1 Comment
2024/08/14
14:35 UTC

1

Axis Sizing when Plotting on an Image

I'm trying to plot a large red point on a plot using Octave. I can't figure out how to get the dot at the place indicated on the graph. When I try to plot the point it is always in the wrong spot. Can someone help me to be able to plot a solid red dot at any point on this graph? I've included my code below, and image 'IM.jpg'.

soils_triangle='IM.jpg';

hold ("on");

imshow (soils_triangle);

sandmin=65;

sandmax=457;

claymin=412;

claymax=26;

sand=(sandmax);

clay=(claymin);

plot (sand, clay, "ro", "markersize", 12, 'ydir', 'reverse');

hold ("off");

pause(4);

close all

https://preview.redd.it/mkkoiqfd0zed1.jpg?width=534&format=pjpg&auto=webp&s=0a95c652378935e0977411cdcdf02a59b94ad6eb

5 Comments
2024/07/27
02:16 UTC

3

Graph a point overtop of an image

I perform soil analyses, where I get percentages of clay and sand. I want to plot these values overtop of the Canadian Soils Triangle. Can someone please tell me how to do this?

In other words, I'd like to import the image below into a graph, and use the same axes as on the triangle in the image. From this point, I'd like to put a red dot where the values indicate.

https://preview.redd.it/5unfpju78xed1.jpg?width=534&format=pjpg&auto=webp&s=28b528b5e774883be1e0ae57457b7681a930b90e

1 Comment
2024/07/26
20:17 UTC

1

Execute commands in BlueCFD terminal with octave

Hey, anyone know how can i execute commands like "simpleFoam" in blueCFD for run an openFOAM simulation from octave?

3 Comments
2024/07/10
18:35 UTC

2

Stock or other tabular data fetching headache.

For those of you who are investement sector focused and/ or (more experienced in Octave), how do you guys import stock data/ download web tabular data into GNU Octave? I have tried almost every single codes (including the most popular one Octave:##>>"......fecth_yahoo()....") I have come across without success. I have even tried tinkering with the code by using the "_yahoofinance" tag to try to comply with the new yahoo-finance api change. I am still get error from the interpretor. Recent warning is below:

">> fetchscndattempt error: 'fetch' undefined near line 26, column 12 The 'fetch' function belongs to the financial package from Octave Forge but has not yet been implemented. error: called from fetchscndattempt at line 26 column 10"

F.I.Y.

  1. I have dropped the financial package in the right directory. And have installed it and loaded up. "pkg list" show the financial is in the package folder with Asterisk beside it, which I believe means is installed correctly.

"pkg describe" confirms that financial pack is loaded.

  1. A search around says Octave package installed but not implemented due to Octave mercury repositories. When i dug further, a path the solution points me to this website https://savannah.gnu.org/bugs/?60472 that supposedly deals with Octave packages and patches.(The site seemed too sketchy to my liking so I did not bother to download anything from there. LOL!!)

Hope those of you with more experience can point me in the right direction/ to simple solution to this proble. Thanks in advance.

P/S Just for context, I am still a noob in programming in general and in the Octave/ Matlab Ecosystems. My best experience in programming comes from dabling in vba for excel. Played around a bit with in recent times with Python but its numerous libraries and their own problems gave me choices selection paralysis and other headaches to the point I was losing focus of my project. I dont have alot of free time per day and dont want to look focus of my main objectives and thus recently switched to Octave/ Matlab just for their simplicity (At least, it seemed, until this speed bump).

1 Comment
2024/06/27
00:09 UTC

1

movstd swaps dimensions?

I've noticed that the movstd function swaps the dimensions of my matrix.

My input is Mdata_rs a 3x5x100 matrix and the output movSTDdata_rs is a 5x100x3 matrix. I tested with a smaller 3D matrices (2x3x5) and it works fine. Did I miss something in the documentation?

Here is my code :

clear; close all; clc;

xlist = 1:5;
ylist = (1:3)*10;

% Making a LUT from x and y : LUT --> nConf | x | y
count = 1;
for kx=1:length(xlist)
 for ky=1:length(ylist)
   LUT(count,:) = [count xlist(kx) ylist(ky)];
   count = count+1;
   end
end

% Making the data --> nConf | measurement
% data :  1 x1
%         2 x2
%        ...
%        15 x15
%         1 x16
%         2 x17
%        ...
Nrounds = 100;
data = zeros(Nrounds*length(LUT),2); % Let's have a multiple rounds/cycles measurements
data(:,2) = rand(length(data),1); % Random measurements
data(1:floor(Nrounds)*length(LUT),1) = repmat(LUT(:,1),[floor(Nrounds) 1]); % Fill the nConf column

% Parameter to compute a noise approximation
wlen = 3; % window length
opt = 0; %see movstd doc

%% Reshaping the data in a 3D matrix with each column in the third axis is a conf with Nrounds layers
Mdata_rs = reshape(data(:,2),[length(ylist) length(xlist) Nrounds]);
movSTDdata_rs = movstd(Mdata_rs,wlen,opt,3);
output1 = median(movSTDdata_rs,3); %Get a noise approximation ignoring the possible base line
0 Comments
2024/06/26
09:17 UTC

12

what's the state of Octave? does it have a user base and how many are developing it?

It is such good software but the community seems dead. Not much activity relative to how good the software is, but there are always updates and many packages. Maybe users just don't need any help and therefore it's kind of quiet around it, and it just keep ticking by itself? What is the state of Octave?

6 Comments
2024/06/19
10:39 UTC

1

Confused about behavior of copyobj in subplots

I have constructed a MWE of what I don't understand

%MWE
flag = 1;

function sub = func1
        fig1 = figure('Visible', 'off');
                sub = subplot(1,1,1);
                        contour(magic(10));
end

function func2 (sub, flag)
        fig2 = figure;
                subplot(1,2,1)
                        copyobj(sub, fig2);
                if flag
                        subplot(2,2,2)
                end
end

sub = func1;
func2(sub, flag);

If I run this script, I get a blank figure--two pairs of axes but no plot. If I instead set the flag to zero, I see a contour plot (which is what I expect and need). Can anyone tell me why?

I am running a simulation that takes a while to complete and generates a contour plot (as a subplot of a larger figure). I then need to iterate many times to add a dot to that plot in a certain location. I could speed this up by a gigantic factor if I didn't need to regenerate the contour plot each time, so I have been trying (for the better part of a day now) to just import a handle to a subplot into another figure as a subplot.

FWIW, I can briefly see the plot I need if I switch to the figure window quickly enough. But it's erased when further subplots are created.

1 Comment
2024/06/10
14:45 UTC

3

Switching from MATLAB to Octave, as a neuroscientists. What are my toolbox. compatibility options?

Hi,

I am a neuroscientist that recently joined a new lab. While we have a MATLAB license, we don't have license to any of the toolboxes I usually need (see list below). I thought about asking my lab leader to buy these toolboxes, which would cost about 2000 euros. But then I remembered that Octave is out there and several people have been talking positively about it recently. So I decided to have a look. I know that Octave is fairly compatible with MATLAB but not entirely. I assume that running MATLAB code in Octave might not produce identical results, I can live with that since I plan to code exclusively in Octave. How is the other way around? I tend to publish quite a bit of my code and functions, will Octave code produce exactly the same results in MATLAB or is it still an issue?

Finally, before I make the huge jump and try to transition several years of work to a new language I am wondering if I can find similar libraries to the following MATLAB toolboxes (because if I can't, Octave will probably not work for me):

  1. Bioinformatics Toolbox 2) Curve Fitting Toolbox 3) Deep Learning Toolbox 4) Econometrics Toolbox 5) Image Processing Toolbox 6) Optimization Toolbox 7) Parallel Computing Toolbox 8) Signal Processing Toolbox 9) Statistics and Machine Learning Toolbox 10) Wavelet Toolbox.

I know that the best way is to try and see, but I would hate to spend 2-3 months of coding for a project until I hit a wall and have to migrate back.

6 Comments
2024/06/08
13:42 UTC

1

Unable to install control package

I have encountered this problem when trying to install the control package on Octave. Any suggestions?

https://preview.redd.it/vpbx1m29ib5d1.png?width=1359&format=png&auto=webp&s=39180d432e80c80fefc7a027828d2bcefea2c93e

4 Comments
2024/06/08
09:32 UTC

3

Octave opens CMD as command window when I try to open GUI interface

Since I installed octave, every time I try to open GUI I also get a CMD window. Any suggestions for it to open just GUI interface?

11 Comments
2024/05/18
16:03 UTC

2

Help please! Trying to convert audio file (.m4a) to a .csv xy plot point

I am trying to convert an .m4a file to csv xy point so I can bring them in to a CAD software like fusion 360 and make it into a spline. I am brand new to Octave but what I saw it seemed like the right software to do it but I can't find anyone showing how to do it.. Any help would be great.

Also if you know a different way of doing this please let me know!

1 Comment
2024/05/12
15:03 UTC

1

Problem whit line 19 ples help

clc;clear;

A=5;

B=2;

C=12;

D=15;

dt=0.02;

t0=0;

yac=A;

tf=6;

it=0;

W=0.5;

yv = A - dt * B + (1/2) * (dt^2) * (-C*A - B*dyac) * (1/A);

for i=t0:dt:tf

yn = ((D*i*sin(3*i) - C*yac)*2 - (dt^2)*(2*A*yv) + (B*dt*yv) + 4*A*yac) * (1 / (2*A + B*dt));

it=it+1

vt(it)=i

vy(it)=yac

yv=yac

  yac=yn

  end

plot(vt,vy)

yn

2 Comments
2024/05/11
00:08 UTC

3

How to minimize function with extra condition in Octave?

I want to solve a problem of finding a point on a curve (which represents a river of a shape given by the curve) so that person can travel in minimum time from point A to point B which are located on different sides of a curve. The velocities of the person on the land and in the water are known and there is also the water current velocity. I tried to use fminbnd function at first (1st image). My function looks like this:

function res = maliboo(fshore,Vr,x0,x1,Vb,Vw)
x = linspace(x0(1)-2, x1(1)+2);
y = fshore(x);
plot(x,y)
ylim([min(min(y), x1(2))-1 max(max(y), x0(1))+1])
hold on
plot(x0(1), x0(2), 'o')
plot(x1(1), x1(2), '*')
s1 = @(xx) sqrt((x0(1) - xx)^2 + (fshore(xx)-x0(2))^2);
s2 = @(xx) sqrt((x1(1) - xx)^2 + (fshore(xx)-x1(2))^2);
v2 = sqrt(Vr.^2+Vw.^2);
## t = s1 / Vb + s2 / v2;
t = @(xx) (sqrt((x0(1) - xx).^2 + (fshore(xx)-x0(2)).^2))./ Vb + (sqrt((x1(1) - xx).^2 + (fshore(xx)-x1(2)).^2))./ v2;
## xxx = fminbnd(t, x0(1), x1(1));
## h = @(xx) fshore(xx + (x1(1)-xx)/2) - (x1(2)-fshore(xx))/(x1(1)-xx) * (xx + (x1(1)-xx)/2) - fshore(xx)-((x1(2)-fshore(xx))/(x1(1)-xx))*xx;
xxx = sqp((x1(1)-x0(1))/2, t);
plot(xxx, fshore(xxx), 'x')
plot([x0(1) xxx], [x0(2) fshore(xxx)], '--', 'linewidth', 2)
plot([xxx x1(1)], [fshore(xxx) x1(2)], '--', 'linewidth', 2)

fshore is function handle that determines the boundary shape; Vr, Vb, Vw - speeds; x0, x1 - starting and ending points

The problem is that the second part of the path should be below the curve. I also tried to use sqp function and the resulting point turned out a bit different (2nd image). I am not sure what condition should I add here to get the desired path. I wouldn't want to use any extra packages though...

Could someone please give a hint? Thanks in advance.

https://preview.redd.it/41m6nfwem6yc1.png?width=1182&format=png&auto=webp&s=08081331af8ee42098ba280ab1464434b54e462d

https://preview.redd.it/2sjvolffm6yc1.png?width=818&format=png&auto=webp&s=d33a2d72dd669efb7d83e646aaab06b8ddb579d9

3 Comments
2024/05/03
09:39 UTC

0

Help me please hurry! What is the answer!

You want to create a 4-by-7 array of random numbers. Next your program moves through the array, element by element, and sets any value that is less than 0.2 to 0 and any value that is greater than (or equal to) 0.2 to 1.

 

Your code looks like this, with one line missing (replaced by ???). What command belongs in that line? 

A = rand(4,7);
[M,N] = size(A);
for j = 1:M
????????????????????
        if A(j,k) < 0.2
            A(j,k) = 0;
        else
            A(j,k) = 1;
        endif
    endfor
endfor
1 Comment
2024/05/02
21:51 UTC

9

Octave group

Hi,
I recently discovered that the group was unmoderated and became restricted (only approved users could post) for almost 2 years.
I requested to be moderator to get it going again.

I'm working through the queue slowly and I hope those who requested to join in the last two years might still be interested.

3 Comments
2024/04/15
04:15 UTC

3

How to integrate with multiple variable, but with respect to a single one

Let's say I have f(x)=x+y and I want to integrate with respect to x from 0-3, which should give me 9/2+3y. I can't seem to figure out how to do that though, any ideas? I tried this code,

function g = f(x)
  g = x+y;
endfunction
[q, ier, nfun, err] = quad('f',0,3)

Which gives this error:

error: quad: evaluation of user-supplied function failed
error: called from
    f at line 2 column 5
    octave-test.m at line 4 column 21
5 Comments
2022/10/14
03:45 UTC

1

ans variable can't be cleared after using csvread

I've written a short script that creates a cell array and adds a new cell for each csv file that I choose. The script keeps looping so I can keep choosing csv files. It stops when I push cancel in the file browsing window that pops up.

I'm seeing strange behavior with the ans variable. First off, I've put a semicolon after every line so I don't know why ans is created. Secondly, even if I type "clear ans" in the command line, ans is deleted and then immediately reappears. The value of ans is one of the csv files I browsed.

If I type "3+4" into the command line, it returns "ans = 7" and I can see that ans changes to 7 momentarily, but then ans right away changes to what it was before. I don't understand what could be causing ans to change.

Here's the script.

%% Data Loader v2
%
% Oct 7, 2022

% Choose Data Name in the save function below!

[fname, fpath] = uigetfile();
i = 1;
while fpath ~= 0
  Test11_late{i} = csvread(strcat(fpath, fname));
  i = i + 1;
  [fname, fpath] = uigetfile();
end

clearvars -except Test11_early Test11_late;

% Set data name in the first argument below. Keep the quotes.
save(strcat("Test11", ".mat"));

Here's my workspace after running the script and choose two csv files.

https://i.imgur.com/EhgKm6P.png

​

I can probably work around this, but I'm really curious about what's going on. Any ideas are welcome! Thanks!

​

EDIT: Since ans was one of the csv files I chose, I wanted to see if it would change based on the order I chose the csv files and now I cannot get the behavior to happen. This issue was plaguing me yesterday, and today, and now that I've created this thread and changed the order I choose the csv files, I can't get it to do it at all anymore. Even when I go back to the original order I was choosing them.

I have no explanation.

0 Comments
2022/10/11
18:28 UTC

2

Octave code help needed

I am not able to overcome this problem no matter what I try. I don't see anything wrong IM doing but yea I'm sure there is. Please help and thank you so much!

The code

​

The error script

​

The Original equations

I've been stuck at this for 2 weeks and this is part of my research project. Please do explain in newbie language (if you're sharing the final codes that's fine too hehe)

1 Comment
2022/10/09
23:59 UTC

8

Is there any way to run octave in android for free?

Hello

I used octave in termux before but it doesn't work now. The old apks don't work, and the new app costs money. what other options are there?

Thanks for reading :)

6 Comments
2022/10/06
20:17 UTC

2

Defining N many (N,1) vectors each of which is a column of eye(N)

I want a code such that if I fix N = 42 (e.g.), for any i between 1 to N, if I enter A_i in the command line, I get the output eye(N)(:, i).

I would like to avoid defining them by hand.

4 Comments
2022/09/29
10:35 UTC

7

Interesting code to create animated GIFs in Octave

1 Comment
2022/09/26
17:57 UTC

Back To Top