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 7556861
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T11:58:22+00:00 2026-05-30T11:58:22+00:00

The two spectrograms are in the same dimension. I tried S = spectrogram() to

  • 0

The two spectrograms are in the same dimension.
I tried S = spectrogram() to get the vector S, but I don’t know how to draw back to spectrogram with it.

  • 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-30T11:58:23+00:00Added an answer on May 30, 2026 at 11:58 am

    In the documentation, it says that the images are drawn with the command surf(T,F,10*log10(abs(P)));. So for example, you could plot the difference of two of these images with:

    %# make some data
    T = 0:0.001:2;
    X1 = chirp(T,100,1,200,'q');
    X2 = chirp(T,150,1,200,'q');
    
    %# plot the first spectrogram
    subplot(3,1,1);
    spectrogram(X1,128,120,128,1E3);
    title('Quadratic chirp 100Hz')
    
    %# plot the second spectrogram
    subplot(3,1,2);
    spectrogram(X2,128,120,128,1E3);
    title('Quadratic chirp 150Hz')
    
    %# plot their difference
    subplot(3,1,3);
    [~,F1,T1,P1]=spectrogram(X1,128,120,128,1E3);
    [~,F2,T2,P2]=spectrogram(X2,128,120,128,1E3);
    %# just use the difference of the above two plot's z-values:
    surf(T2,F2,10*(log10(abs(P2))-log10(abs(P1))),'edgecolor','none');
    %# this is actually a 3D plot, so we set the viewing
    %# angle as straight up and rotated by 90 to match the previous plots
    view(90,-90);
    axis tight;
    title('Difference of Plots (2nd - 1st)')
    ylabel('Freq (Hz)');
    xlabel('Time');
    

    This code makes the following plot:

    Difference of Spectrograms Example

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

Sidebar

Related Questions

Two Questions: Will I get different sequences of numbers for every seed I put
Two points -- first, the example is in Fortran, but I think it should
Two questions, please. 1) I am reading about FEDERATED storage engine, but for me,
Two issues that will likely be immediately obvious, but I've spent too long already
Two string variables are set to the same value. s1 == s2 always returns
Two Python strings with the same characters, a == b, may share memory, id(a)
Two RAID volumes, VMware kernel/console running on a RAID1, vmdks live on a RAID5.
Two years ago, we shipped a multi-gigabyte Windows application, with lots of video files.
Two questions: Can someone point me to unbiased data that compares .NET performance to
Two snippets of MySQL: SELECT * FROM annoyingly_long_left_hand_table LEFT JOIN annoyingly_long_right_hand_table ON annoyingly_long_left_hand_table.id =

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.