char convertion into double. please help!!!

6 ビュー (過去 30 日間)
Rhyn
Rhyn 2013 年 5 月 21 日
I have a set of wind data (Time, v10, u10, etc.) This is how my time data look.
Time =
  • 2008-08-30_00:00:00
  • 2008-08-30_01:00:00
  • 2008-08-30_02:00:00
  • 2008-08-30_03:00:00
  • 2008-08-30_04:00:00
  • 2008-08-30_05:00:00
  • 2008-08-30_06:00:00
  • 2008-08-30_07:00:00
  • 2008-08-30_08:00:00
  • 2008-08-30_09:00:00
  • 2008-08-30_10:00:00
  • 2008-08-30_11:00:00
  • 2008-08-30_12:00:00
  • 2008-08-30_13:00:00
  • 2008-08-30_14:00:00
  • 2008-08-30_15:00:00
  • 2008-08-30_16:00:00
  • 2008-08-30_17:00:00
  • 2008-08-30_18:00:00
  • 2008-08-30_19:00:00
  • 2008-08-30_20:00:00
  • 2008-08-30_21:00:00
  • 2008-08-30_22:00:00
  • 2008-08-30_23:00:00
I am looking at Santa Ana wind (wind velocity).I would like to plot wind against time. However, I am not sure what is the best way to plot it since I have two vectors (and how to produce a resulting vector).
I am sorry if these are confusing, but please help. I am very very new to Matlab, I beg you to be explicit in explanation.Thank you so much!
  1 件のコメント
Jan
Jan 2013 年 5 月 22 日
編集済み: Jan 2013 年 5 月 22 日
The shown information is not clear: Is "Time" a dotted list in a Word-file? Please use standard Matlab syntax to define the inputs. E.g.:
Time = {'2008-08-30_00:00:00'; '2008-08-30_01:00:00'}
Then it is immediately clear, what you are talking about.
The same matters "I have two vectors (and how to produce a resulting vector)". What does "resulting" mean? Do you want to concatenate the vectors, create the mean, add them or project one onto the other?
Please explain the problem with more details by editing the original question (not as comment or answer, because readers should find all necessary details at one location).

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2013 年 5 月 21 日
datenum('2008-08-30_14:00:00', 'YYYY-MM-DD_hh:mm:ss')
would give you the date in "serial date format" (days since 0-0-0 00:00)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDates and Time についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by