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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:25:35+00:00 2026-06-16T03:25:35+00:00

I’m trying to plot values in matlab. my csv file looks like this, >

  • 0

I’m trying to plot values in matlab.

my csv file looks like this,

> 15.12.2012 11:27; 0.9884753
> 15.12.2012 11:12; 10.670.642
> 15.12.2012 10:57; 114.455.145
> 15.12.2012 10:42; 101.301.446
> 14.12.2012 10:27; 0.99031037
> 14.12.2012 10:12; 104.594.388
> 14.12.2012 09:57; 0.97192177
> 14.12.2012 09:42; 0.8925
> 14.12.2012 09:27; 0.8985693
> 14.12.2012 09:12; 0.955
> 14.12.2012 08:57; 0.95103529
> 13.12.2012 08:42; 0.95203444
> 13.12.2012 08:27; 0.955
> 13.12.2012 08:12; 0.95970876
> 13.12.2012 07:57; 0.95929422
> 13.12.2012 07:42; 0.95578656
> 13.12.2012 07:27; 0.955
> 12.12.2012 07:12; 0.955
> 12.12.2012 06:57; 0.95342687
> 12.12.2012 06:42; 0.955
> 12.12.2012 06:27; 0.955
> 12.12.2012 06:12; 0.95930485
> 11.12.2012 05:57; 0.95530825
> 11.12.2012 05:42; 0.96452381
> 10.12.2012 05:27; 0.9675
> 10.12.2012 05:12; 0.98778061
> 10.12.2012 04:57; 102.982.993

I ‘m reading ‘11.12.2012 04:57’; as string and then using datvec.

[Y, M, D, H, MN, S] = datevec(‘String’)

Just to make it clear again

Col1=String  % [Y, M, D, H, MN, S]
Col2= number % [0.9884753;...;102.982.993]

Now i want to plot second col2 with respect to first Col1 ([Y, M, d].

plot (Col2)

It works . In my example data I have more than a single value for the same day.
How can I label my plot with date that appear only once per day.

regards,

  • 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-16T03:25:36+00:00Added an answer on June 16, 2026 at 3:25 am

    You can do something as listed below. Since the date strings are not so short, it looks nicer to render them rotated (with rotateticklabel).

    str = {
      '15.12.2012 11:27';
      '15.12.2012 11:12';
      ...
      '10.12.2012 04:57'
    };
    
    num = [
      0.9884753;
      10.670642;
      ...
      102.982993
    ];
    
    % find first occurrence of dates
    [y,m,d,h,mn] = datevec(str,'dd.mm.yyyy HH:MM');
    dn = datenum(y,m,d);
    [~,ind] = unique(dn,'first');
    ind = sort(ind);
    
    % plot it nicely
    plot(num);
    ax = gca;
    dstr = cellstr(datestr(dn,'dd.mm.yyyy'));
    set(ax, 'XTick',ind, 'XTickLabel',dstr(ind), 'Position',[0.1,0.15,0.8,0.75]);
    rotateticklabel(ax, 30);
    

    And this is what you can get:
    enter image description here

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

Sidebar

Related Questions

I am trying to render a haml file in a javascript response like so:
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
For some reason, after submitting a string like this Jack’s Spindle from a text
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
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

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.