Question

Write a script in matlab that prompts the user to input the day, month, and year;...

Write a script in matlab that prompts the user to input the day, month, and year; determine the day of the year (the number of days including the current day). Be sure to take leap year into account. Use a for loop Test your code on the following dates:

February 28, 2015

April 9, 1976

October 12, 1887

Create a script that performs the same function as repmat. The only built-in commands you may use are input, size, and disp.

0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 10 more requests to produce the answer.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
Write a script in matlab that prompts the user to input the day, month, and year;...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • 1) Write a MATLAB script to prompt a user to input two numbers, then assess whether...

    1) Write a MATLAB script to prompt a user to input two numbers, then assess whether the two numbers are equal or not. If the two numbers are equal, display that they are equal in the Command Window. If they are not equal, display that they are not equal in the Command Window. 2) Write a MATLAB script that prompts the user to enter the day of the week using the input function. If the information the user enters is...

  • Write a MATLAB script, which asks the user to input the angle xd (in deg) and...

    Write a MATLAB script, which asks the user to input the angle xd (in deg) and then approximates sine of the angle using the first 5 terms of Taylor series as follows: n+12n-1 sin n-1 (2n-1)! 1 Note that x in Taylor's equation is in radian, so make sure to do the conversion first Start with defining the vector n=1:5 and then use element-wise operation and basic MATLAB commands to calculate the summation. To calculate the factorial of any number,...

  • In python Prompt user to input the number of the month they were born. Using a...

    In python Prompt user to input the number of the month they were born. Using a while loop, continue prompting for the month until the user inputs a valid month number. Figure out the number of days in the month the user entered. Then prompt the user to input the day they were born. Using a while loop, continue prompting until they input a day that is within the range of the number of days in their month. Assume 28...

  • using matlab, write a script for the following that prompts the user to input the amount...

    using matlab, write a script for the following that prompts the user to input the amount of cases bought as a vector, calculates the cost, and stores the correspondind cost in a row beneath the demand: the price of produce is calculated as follows: if 30 cases of oranges are bought, the cost is 4 dollars per case if more than 30, but less than 100 cases are bought, the cost is 10 for the first 30 cases, then 3...

  • This question is for MATLAB. Write a script that continuously asks the user for a new...

    This question is for MATLAB. Write a script that continuously asks the user for a new sentence, until the user types the word "STOP". The program records all of the sentences the user wrote (not including "STOP") in a matrix with as many rows as needed but with an N number of columns. The user is prompted to provide N before typing in the first sentence. The output of the program is the array with the sentences in it, in...

  • USING MATLAB Write a script that asks the user to input a sentence. It then replaces...

    USING MATLAB Write a script that asks the user to input a sentence. It then replaces all instance of 'he', 'she', 'He', or 'She' with 'Mr. Meseeks' and prints out the new sentence. . HINT: Use 'strrep' and 'lower' function.

  • Given the poem: Thirty days hath September April, June, and November All the rest have thirty-one...

    Given the poem: Thirty days hath September April, June, and November All the rest have thirty-one with February's 28 to make it fun. Leap Year happening one in four, Gives February one day more. How would I write this program using an Enum instead of an array? 1. Prompts the user for a month string (January, February, ...). Validate the input month string against an array of month's, and prompt the user again if the String entered is not a...

  • MATLAB homework assignment (HW6), but this time using a "vectorized" approach. Write a script that prompts...

    MATLAB homework assignment (HW6), but this time using a "vectorized" approach. Write a script that prompts the user for N integers (set N-6), one at a time, using a while loop. Error-check to ensure that each number entered is an integer, displaying an error message if it is not. If it is an integer, store it in an array variable nums. Continue prompting until N integers have been successfully entered. (You may copy and paste your code from the previous...

  • Javafx Given the poem: Thirty days hath September April, June, and November All the rest have...

    Javafx Given the poem: Thirty days hath September April, June, and November All the rest have thirty-one with February's 28 to make it fun. Leap Year happening one in four, Gives February one day more. Write a program that does the following: 1. Prompts the user for a month string (January, February, ...). Validate the input month string against an array of month's, and prompt the user again if the String entered is not a valid month. Note: You may...

  • I need this MATLAB question answered ASAP!!! thanks in advance! 10 Write a program which prompts...

    I need this MATLAB question answered ASAP!!! thanks in advance! 10 Write a program which prompts the user for data and returns the mean. The code should execute the following steps: 1) Prompts the user to enter the number of observations 2) Use a FOR-LOOP to get data from user. At each iteration, the user is asked for value of the i-th observation 3) At each iteration, print the mean of the sample up to and including the i-th observation...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT