フィルターのクリア

why doesn't this code work when asking for the month of the date?

2 ビュー (過去 30 日間)
leon
leon 2017 年 7 月 28 日
回答済み: leon 2017 年 7 月 29 日
clear
clear all
clc
prompt = ['Please enter the starting date mm/dd/yyyy: \n' ... '(Ex. 07/27/2004 or 7/27/2004) \n\n'];
%
% my intended input is 7/11/2016
%
D = input(prompt,'s');
D
[DayNumber] = weekday(D)
datestr(D)
m = month(D,'name')
  4 件のコメント
James Tursa
James Tursa 2017 年 7 月 29 日
What is f?
leon
leon 2017 年 7 月 29 日
its not in my script. it must be in the script of the month function.

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

採用された回答

leon
leon 2017 年 7 月 29 日
% I wanted to simply output the entire name of the month.
% I found another way to do it using m = datestr(D, 'mmmm')
% Which works fine

その他の回答 (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