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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T07:38:41+00:00 2026-06-02T07:38:41+00:00

In the following example, I would appreciate some feedback on the best method for

  • 0

In the following example, I would appreciate some feedback on the best method for plotting the required outcome.

    clear all
Table1 = {0.990,0.987,0.972,0.832,0.776,20;0.988,0.986,0.961,0.946,0.906,...
    30;0.963,0.956,0.850,0.897,0.908,70;0.970,0.968,0.922,0.835,0.674,...
    90;0.957,0.950,0.908,0.925,0.955,100;0.966,0.963,0.948784273781552,0.892,...
    0.812,120;0.977,0.973,0.932,0.779,0.648,450;0.985,0.985,0.915,...
    0.832,0.792,480;0.979,0.969,0.939,0.814,0.642,550;0.983,0.980,0.916,...
    0.719,0.520,570;};
locations = {'loc1','loc2','loc3','loc4','loc5'};
CombLocation = locations(nchoosek(1:length(locations),2));
Table2 = [CombLocation,Table1];
Headings = {'location1','location2','depth1','depth2','depth3','depth4',...
    'depth5','residence time'};
Table3 = [Headings;Table2];
depths = [5.3,6.8,16.3,24,16.78];

Here, we have ‘Table3’ which demonstrates the correlation values (of water temperature) between different locations (‘loc1′,’loc2’) being ranked according to ‘residence time’ (where residence time is the difference in residence time between the locations). What I would like to do is to show that as the depths increases, the level of coherency is greatly affected by the residence time.

This can be done for each depth individually e.g.

figure;
plot(cell2mat(Table3(2:11,8)),cell2mat(Table3(2:11,7)));

thus showing that as the residence time increases, the correlation decreases. This can then be repeated for a shallower depth i.e. depths(1) e.g.

figure;
plot(cell2mat(Table3(2:11,8)),cell2mat(Table3(2:11,3)));

However, I would like to produce one plot which showed that as the water depth increased, the locations with a higher level of coherency were those which had a smaller difference in residence time.

Any advice would be appreciated.

  • 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-06-02T07:38:42+00:00Added an answer on June 2, 2026 at 7:38 am

    How about a surface plot?

    residences = cell2mat(Table3(2:end, end));
    correlations = cell2mat(Table3(2:end, 3:end-1));
    [X Y] = meshgrid(depths, residences);
    surf(X, Y, correlations)
    xlabel('Depth');
    ylabel('Residence');
    zlabel('Correlation');
    shading interp;
    

    This should show what you want, although your depths array looks strange since it isn’t sorted, which makes the surface cut back underneath itself. You could fix this with:

    [depths i] = sort(depths);
    correlations = correlations(:, i);
    

    but this makes the surface look strange (since a depth of 16.78 seems to have lower correlation than depth of 24).

    Replacing [X Y] = meshgrid(depths, residences); with [X Y] = meshgrid(1:numel(depths), residences); might make sense if you just want to show what happens depth increases (otherwise we get a big gap between depth = 6.8 and depth = 16.3).

    You can also experiment with removing shading interp and replacing surf(X, Y, correlations) with something like

    scatter3(X(:), Y(:), correlations(:), '.');
    

    to get a scatter plot instead.

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

Sidebar

Related Questions

Would very much appreciate some assistance with this issue. I use the following common
Given the following contrived example: I would like to query my data for all
The following code is an example of what I think would qualify as pseudocode,
I'm going crazy with this and would greatly appreciate some help. Imagine two tables
I am experiencing some strange behavior with OSQL, and would appreciate any help. I
I needed some help/pointers on a homework problem. I would really appreciate it if
The following example will not compile for me: #include <iostream> #include <functional> #include <string>
Example: Suppose in the following example I want to match strings that do not
Given the following example (using JUnit with Hamcrest matchers): Map<String, Class<? extends Serializable>> expected
Take the following example, I have a class public class SomeItem { public string

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.