Question: This is a MATLAB problem Create a constructor function called SetTimeConstruct to construct a structure called TimeHrMin with two fields: hours to hold the hours,
This is a MATLAB problem
Create a constructor function called SetTimeConstruct to construct a structure called TimeHrMin with two fields: hours to hold the hours, and mins to hold the minutes. The function has integer inputs hoursVal and minutesVal. The constructor function should check if and . If not, the value should be set to 0.



Previous Assessment:Incorrect Submit X Check SetTimeConstruct( 23, 31) returns structure time1 -hours: 23 mins: 31. Error in SetTimeConstruct Line: 4 Column: 9 Expression or statement is incomplete or incorrect. SetTimeConstruct( 23, 31) should return: time! = struct with fields: hours: 23 mins: 31 X Check SetTimeConstruct(-1,-1) returns structure time! = hours: 0 mins: 0 Error in SetTimeConstruct Line: 4 Column: 9 Expression or statement is incomplete or incorrect. SetTimeConstruct-1, -1) should return: time 1 = struct with fields: hours:0 mins: 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
