GUI birth calculator code ?
15 次查看(过去 30 天)
显示 更早的评论
Hi everyone
i have a project that i have an input of birth date and my output is the age of the memmber in second , and i must do it in GUI with matlab
can i have a help on the code ? thank you so much
0 个评论
回答(2 个)
Harshit Desai
2021-3-17
I understand that you want to create a Basic GUI for a project to calculate the age of a person in Seconds(unit of time measurement)
To Help you get started with the GUI here is a short youtube video which descibes how to build apps in MATLAB. Its really cool and I think you should give it a go. --> https://youtu.be/nb0jHVXKY2w
if you are just looking for converting the input as Birth Date to age in Seconds via script. Here is the code that may help.
birthDate = '2021-03-16';
time = datevec(birthDate);
CurrentTime = clock;
Age = seconds(etime(CurrentTime,time)) % time in seconds
The documentation to the Functions I have used are here -->
Sameer Ahmad
2023-2-9
birthDate = '2021-03-16'; time = datevec(birthDate); CurrentTime = clock; Age = seconds(etime(CurrentTime,time)) % time in seconds
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 File Operations 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!