Question: Using Matlab. Everytime I try to use the function it tells me function error Write a function nexthour that receives one integer argument, which is

Using Matlab. Everytime I try to use the function it tells me function error

Write a function nexthour that receives one integer argument, which is an hour of the day, and returns the next hour. This assumes a 12-hour clock; so, for example, the next hour after 12 would be 1. If it receives one integer greater than 12 or less then 0, the function will instead return a flag of -100.

Here are examples of using this function: >>nexthour(12)

ans= 1

>>nexthour(2)

ans= 3

>>nexthour(-20)

ans= 100

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!