The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: plotting and cross-correlation
Replies: 4   Last Post: Feb 25, 2013 1:19 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 5
Registered: 4/27/12
Re: plotting and cross-correlation
Posted: May 8, 2012 6:03 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Matt J" wrote in message <joafug$qib$>...
> "shaula nataya" <> wrote in message <joa78v$nqu$>...
> > Hello,
> > I have thickness thermocline data (meter) and Ocean Dipole Index (IOD) from 2000-2009 (the data are monthly). I want to draw the plot and calculate the correlation between the two data and show the correlation value on the plot. Can you guys help me with this?

> ==============
> Why isn't as simple as using the PLOT command?

> > And I don't have any idea about what formula that have to be used on the correlation.
> ===============
> Why isn't it as simple as using XCORR or CONV?

I already do with plot command and corrcoef but I got confused with it and I can't show the correlation value on the plot.

below are the script :
y1 = xlsread('upper.xlsx', 'upper - IOD', 'F26:F37'); %upper
y2 = xlsread('upper.xlsx', 'upper- IOD', 'G26:G37'); %IOD
x = xlsread('upper.xlsx', 'upper - IOD', 'B26:B37'); %time

[ax,h1,h2] = plotyy(x,y1,x,y2,'plot');

set(get(ax(1),'ylabel'),'string','Depth (m)')
title('Upper Layer - IOD Tahun 2002')
legend('Upper Layer','IOD')

r = C(2,1);


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.