Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6672883
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:33:39+00:00 2026-05-26T03:33:39+00:00

The source file is named ReadOutputFile.m. function ReadOutputFile(inputFile, outputFile) SPIT = 2; R_REGULARITY =

  • 0

The source file is named “ReadOutputFile.m”.

function ReadOutputFile(inputFile, outputFile)

SPIT = 2;
R_REGULARITY = 8;

%read input, threshold, and level
spitclip = wavread(inputFile);
spitclip = spitclip*(2^15);

fid = fopen('threshBinary.bin', 'rb', 'native');
thresh = fread(fid, 'int16');
fclose(fid);

fid = fopen('signalLevelBinary.bin', 'rb', 'native');
lvl = fread(fid, 'int16');
fclose(fid);


%get start and stop information from output file
outputNumeric = csvread(outputFile);

starts = outputNumeric(:,1);
stops = outputNumeric(:,2);
types = outputNumeric(:,8);
reasons = outputNumeric(:,9);
regularity = outputNumeric(:,7);

indicesOfSpits = find(types==SPIT);

numEvents = length(starts);

eventGate = zeros(1,length(spitclip));
firstSpits = zeros(1,length(spitclip));
chainedSpits = zeros(1,length(spitclip));

maxVal = 800;

%loop through events and plot spits only
%color code by reason
for n = 1:length(indicesOfSpits)
    i = indicesOfSpits(n);

    if(reasons(i) == R_REGULARITY)
        chainedSpits(starts(i):stops(i)) =  regularity(i)*800;
    else
        firstSpits(starts(i):stops(i)) =  maxVal;
    end
end

plot(spitclip);
hold on;
grid on;
plot(lvl,'r');
plot(thresh, 'y');
plot(firstSpits, 'm');
plot(chainedSpits, 'k');
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T03:33:40+00:00Added an answer on May 26, 2026 at 3:33 am

    That looks like Matlab (or the free equivalent octave)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

say you have a source file named sum.c that looks like this: #include sum.h
I want to use regex from a source file named source.html or source.txt :
Suppose I have two lists that holds the list of source file names and
I have some source code to get the file name of an url for
I have some source codes to display all file names in a UITablView I
I'm using GCC; __FILE__ returns the current source file's entire path and name: /path/to/file.cpp
I mean, I want the logger name to reflect the source.jsp file, no matter
I know the user of my app has a local file named c:\sourcefile.cs, I
How to copy the text file through vb6 code. Having Source filename like clock.fin,
This obviously requires the source file to be under source control. I would ideally

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.