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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:09:02+00:00 2026-05-31T05:09:02+00:00

clear all FieldName = {‘loc1′,’loc2′,’loc3′,’loc4’}; data = rand(8760,4); dnew = mat2cell(data,eomday(2011, (1:12))*24,size(data,2)); k =

  • 0
clear all
FieldName = {'loc1','loc2','loc3','loc4'};
data = rand(8760,4);

dnew = mat2cell(data,eomday(2011, (1:12))*24,size(data,2));
k = cellfun(@(x)num2cell(nonzeros(tril(corrcoef(x),-1))),dnew','un',0);
out = [FieldName(nchoosek(1:numel(FieldName),2)) [k{:}]];

This example demonstrates the monthly mean correlation between each pair location from 4 sites and is expressed in ‘out’. I’m having trouble in plotting this information. I would like to draw a line plot for every pair of locations but where the different line plots have different markers. Also, I would like to insert a legend showing the pair of locations, as denoted in out{1,1} and out{1,2}.

I hope I’ve been clear in expressing my intentions.

  • 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-31T05:09:03+00:00Added an answer on May 31, 2026 at 5:09 am

    If you’re interested in something like this,

    Example

    You can use the following code:

    % Plot data
    data = out(:,3:end);
    p = plot(cell2mat(data)');
    
    % Generate a cell containing the display names
    display_names = cellfun( @(a,b) sprintf('%s - %s', a, b), ...
        out(:,1), out(:,2), 'UniformOutput', false);
    legend(display_names);
    
    % Set markers
    markers = {'+', '>', '<', '^', 'v', '*', 'hexagram'};
    for i=1:(min(length(markers), size(out,1)))
        set(p(i),'Marker',markers{i});
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I create a cell array using: clear all data = {rand(1,5),rand(1,4),rand(1,4),rand(1,6)}; a =
%example clear all a1 = struct('data1',rand(12,2),'data2',rand(12,2),'data3',rand(12,3)); a2 = struct('data1',rand(12,2),'data2',rand(12,2),'data3',rand(12,3)); a3 = struct('data1',rand(12,2),'data2',rand(12,2),'data3',rand(12,3)); a4 =
clear all depth1 = [0;2;3;4;5;6;8;10;12;14;16;18]; depth2 = [0;2;3;4;5;6;7;8;9;10;11;12]; depth3 = [0;4;6;8;10;12;14;16;18;20;22;24]; Depth = {depth1,depth2,depth3};
I need to clear all APC cache entries when I deploy a new version
how do i clear all elements in an arraylist?
I would like to clear all radio buttons in a group if I right
How can I clear all textboxes / uncheck checkboxes in my asp.net page without
there are clear, clear all buttons on richfaces fileUpload component. <rich:fileUpload id=quoteFile tabindex=10 listHeight=80
Is there a way to clear all persistent variables in MATLAB functions, while keeping
Currently I do the to following clear all processes running on port lsof -i

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.