Question

Hi, in MATLAB how do you convert date and time (dd-mm-yy mm:ss:S) into time only (mm:ss.S)?

Hi,

in MATLAB how do you convert date and time (dd-mm-yy mm:ss:S) into time only (mm:ss.S)?

Homework Answers

Answer #1

%gives current date and time
c = clock
%convert all the hours into minutes and adding minutes to it and remaining seconds as it is
k = [c(4)*60 + c(5) c(6)]
%printing in mm:ss format
sprintf("%d:%d",k(1),k(2))

If you have any doubts please comment and please don't dislike.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Hi, in MATLAB how do you convert date and time (dd-mm-yy mm:ss:S) into time only (mm:ss.S)?
Hi, in MATLAB how do you convert date and time (dd-mm-yy mm:ss:S) into time only (mm:ss.S)?
How do i convert a Short date to a long date in Oracle SQL? for example.......
How do i convert a Short date to a long date in Oracle SQL? for example.... Convert 09/12/2015 to show as 12th September, 2015
For the following questions, use the definitions of the given structure. struct Date {       int yy,...
For the following questions, use the definitions of the given structure. struct Date {       int yy, mm, dd; }; struct Emp {       char EmpName[25];       float Salary;       struct Date hired; }; struct Dep {       struct Emp manager;       struct Emp worker[25];       float Profits; }; Define a struct Date variable called Date1 and initialize it to February 25, 1957, in the correct format. Define a struct Emp variable called Person1 and initialize it to “Roger”, with a salary of $50,000, who was hired...
discuss how a database administrator can extract data from a database and convert date\time fields out...
discuss how a database administrator can extract data from a database and convert date\time fields out of the data into a different format (DT_DBTIMESTAMP2 to DT_DBDATE).
MATLAB only. Computer science, do not change subject This is matlab question. Give me a working...
MATLAB only. Computer science, do not change subject This is matlab question. Give me a working code for cramers rule the function must accept and AUGMENTED matrix and then solve if the function you give will not accept augmented matrix i will badly dislike it Answer only correctly. take test cases to find output and match
A)How do you convert 1/3 into binary with detailed steps ? B) Also how do you...
A)How do you convert 1/3 into binary with detailed steps ? B) Also how do you convert from repeating binary into decimal. (0.0110011001100110....0110) in base 2 . Assume 0110 patters go to forever. how can we convert it into decimal.
How do you create a current SPSS date/time stamp in your output? I can enter all...
How do you create a current SPSS date/time stamp in your output? I can enter all the information I need for running the program, but the requirements are a current SPSS DATE/TIME stamp must be in the document when you output it into a word document
how do you generate data for a y random variable in matlab? If x has uniform...
how do you generate data for a y random variable in matlab? If x has uniform distribution (0,1) y has uniform distribution (a,b) Then write a matlab code using rand() command to generate data from distribution of y y = ? + ?x a,b, rand()
how do I convert this SOP expression using only 2-input NAND gates? (use DeMorgan's Law) R...
how do I convert this SOP expression using only 2-input NAND gates? (use DeMorgan's Law) R = A'B'C' + AB'
Hi I appreciate you taking my question. I Want you to explain how to do it....
Hi I appreciate you taking my question. I Want you to explain how to do it. I have no data so please makeup data or variables and show work of how to get points and solving. Thank you! The data table doesn't have to be big since this will serve as a set of examples for me to use. For the titration of your isolated P8S1 material construct a table that includes the sample of mass titrated, volume and concentration...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT