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

  • SEARCH
  • Home
  • 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 7688027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:49:52+00:00 2026-05-31T19:49:52+00:00

I’m trying to export the data that is shown in plot(yi) using wavwrite. When

  • 0

I’m trying to export the data that is shown in plot(yi) using wavwrite. When I do an interpolation the (yi) signal doesn’t start at zero how can I get (yi) the interpolated signal to start at zero? Please note that I can’t just do a plot(xxorig, yi) due to the fact that wavwrite doesn’t work this way. Does anyone know a work around?

I’m using octave 3.2.4/matlab

clear all, clf
xxorig=[0, 0.418879, 0.837758, 1.25664, 1.67552, 2.0944, 2.51327, 2.93215, 3.35103, 3.76991, 4.18879, 4.60767, 5.02655, 5.44543, 5.86431, 6.28319];
xx=[0, 0.296192, 0.592384, 0.888577, 1.18477, 1.48096, 1.77715, 2.07335, 2.36954, 2.66573, 2.96192, 3.25811, 3.55431, 3.8505, 4.14669, 4.44288];
yy=[0, 0.406737, 0.743145, 0.951057, 0.994522, 0.866025, 0.587785, 0.207912, -0.207912, -0.587785, -0.866025, -0.994522, -0.951057, -0.743145, -0.406737, -2.44929e-16];

yi=interp1(xx,yy,xxorig);
subplot(4,1,1),plot(xxorig,yy),title("plot(xxorig,yy)")
subplot(4,1,2),plot(xx,yy),title("plot(xx,yy)")
subplot(4,1,3),plot(yy),title("plot(yy)")
subplot(4,1,4),plot(yi),title("plot(yi)")
wavwrite([yy'] ,16,32,'/tmp/test.wav')

enter image description here

  • 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-31T19:49:53+00:00Added an answer on May 31, 2026 at 7:49 pm

    It’s unclear what are you trying to export – plot or sound wav file of the signal?

    You use WAVWRITE to save the sound in WAVE format. In this case you pass signal intensity yi and optionally a sample rate (the default rate is 8000 Hz). You souldn’t care that your signal does not start at 0.

    I believe you can calculate your sample rate for yi as

    Fs = numel(xxorig)/(xxorig(end)-xxorig(1));
    

    If you want to PLOT the signal you specify the time on X axis. If you don’t pass x to the plot function it uses just order numbers starting from 1. This is why your plot(yi) or plot(yy) curve does not start at 0.

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

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
Specifically, suppose I start with the string string =hello \'i am \' me And

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.