Octave support?

stargazer
Posts: 19
Joined: Wed Jun 17, 2020 10:50 pm

Octave support?

Post by stargazer »

Hi I saw Mind Monitor provides Matlab support. I wonder if there is also Octave support. It seems Octave does not have the "readtable" function, so this requires a rewrite. If needed I can write one but first I'd like to check if it is already available. Thanks.
User avatar
James
Site Admin
Posts: 1089
Joined: Wed Jan 02, 2013 9:06 pm

Re: Octave support?

Post by James »

Try this
mmOctaveScripts.zip
mmOctaveScript
(1.13 KiB) Downloaded 203 times
and let me know if it works ok.
stargazer
Posts: 19
Joined: Wed Jun 17, 2020 10:50 pm

Re: Octave support?

Post by stargazer »

Thanks, James. For some reason it generates an empty figure without data on my Octave and Ubuntu. I will take a look later and get back to you.
User avatar
James
Site Admin
Posts: 1089
Joined: Wed Jan 02, 2013 9:06 pm

Re: Octave support?

Post by James »

Email me your CSV file and I'll test it here. I've not used Octave before, so I probably made an error.
I'm testing using Octave 5.2.0 on Windows 10 x64
stargazer
Posts: 19
Joined: Wed Jun 17, 2020 10:50 pm

Re: Octave support?

Post by stargazer »

Thanks. Just sent an email to Support@Mind-Monitor.com. Please check.
User avatar
James
Site Admin
Posts: 1089
Joined: Wed Jan 02, 2013 9:06 pm

Re: Octave support?

Post by James »

Fixed :-)
Your data file has two extra columns with the two secret algorithms in ;-)

This version will autodetect if you have the algorithms and work with both versions.
mmOctaveScripts.zip
(1.24 KiB) Downloaded 187 times
stargazer
Posts: 19
Joined: Wed Jun 17, 2020 10:50 pm

Re: Octave support?

Post by stargazer »

Thank you so much again, James. Now the temp files can capture all data. Unfortunately the textscan function reads in only part of the data and then only 2 straight lines are plotted, on Windows 10 and Ubuntu. Not sure if you saw the same thing.

Anyway I tried the Matlab code and it worked perfectly with Matlab 2019. With Matlab 2018 the hex color codes do not work; maybe we can check the Matlab version and apply different 'Color' options.
User avatar
James
Site Admin
Posts: 1089
Joined: Wed Jan 02, 2013 9:06 pm

Re: Octave support?

Post by James »

If I import your CSV with

Code: Select all

[museData, museElements] = mmOctImport('_2020-06-15--13-43-56_6616100285349042216.csv');
then I get this graph with all five waves:
octave_Chart.png
octave_Chart.png (213.95 KiB) Viewed 3540 times
museData has 2315 data points and museElements has 46 , which adds up to 2361, the number of data lines in the CSV file.

What do you get?
stargazer
Posts: 19
Joined: Wed Jun 17, 2020 10:50 pm

Re: Octave support?

Post by stargazer »

What you showed is identical to what I got using Matlab 2019.

Using Octave I got
Screenshot from 2020-06-20 21-48-36.png
Screenshot from 2020-06-20 21-48-36.png (19.69 KiB) Viewed 3536 times
I modified the code to:

Code: Select all

...
  lineCounts = 0;
  while(!feof(fIn))
    line = fgetl(fIn);
    commas = length(strfind(line,','));
    if (commas==dataCommaCount)
      fprintf(fOutMD,'\n%s,',line);
    else
      fprintf(fOutME,'\n%s',line);
    endif
    lineCounts = lineCounts + 1;
  endwhile
  lineCounts
...
  museData = textscan(fIn,formatData,'HeaderLines',1,'Delimiter',',');
  museDataSize = size(museData)
And I got:
lineCounts = 2361
museDataSize =

1 38

The textscan function seems not functioning properly. This could be due to some setting issue from my side.
User avatar
James
Site Admin
Posts: 1089
Joined: Wed Jan 02, 2013 9:06 pm

Re: Octave support?

Post by James »

What version of Octave are you using?
Post Reply