Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

NEED HELP WITH THIS MATLAB PROBLEM. I AM STUCK AT AN EASY ERROR. I TRIED READING THE EXCEL FILE USING XLSREAD, BUT IT GIVES ME

NEED HELP WITH THIS MATLAB PROBLEM. I AM STUCK AT AN EASY ERROR. I TRIED READING THE EXCEL FILE USING XLSREAD, BUT IT GIVES ME ERROR. I TRIED READTABLE, READMATRIX. EVERYTHING GIVES ME ERROR. PLEASE HELP ON THIS ERROR. THANK YOU

image text in transcribedimage text in transcribedimage text in transcribed

Each year's data is stored in a seperate sheet, and each pair of rows (MAX/MIN) are for a given month. You are writting a program that will calculate the monthly maximum and minimum temperatures for a selected year. The program already has let the user select the year and the name of the sheet corresponding to the selected year is currently stored as a character array in the variable Year. You need to read in that sheet from the Excel file and store the numeric data in TempData. Read in the entire sheet and do not give any cell ranges. From this data calculate the maximum monthly temperatures (the maximum of the MAX rows) and the minimum monthly temperatures (the minimum of the MIN rows) for each month. These values should be stored as MonthMax and MonthMin and should be 121 vectors (one monthly minimum and maximum value for every month of the selected year). - Finding the min and max monthly temperatures can be done in one line each. You don't need to do it 12 times (once for each month). Take a look at the doc pages for the min and max functions to see how to do this. Additionally, look at the next hint for help indexing. - When you find the maximum monthly temperature, you want to find the maximum of the MAX rows, not the MIN rows, therefore you want to pull out everyother row (the opposite is true for the minimum monthly temperature). You can do this with indexing! In addition to indexing a range, like 3:11 which would pull positions 3 through 11, you can include an increment value in the middle, like 3:2:11 which would pull the positions 3 through 11 in increments of 2 (in other words positions 3,5,7,9,11 ). Script 0 Assessment: 3 of 4 Tests Passed (75\%) * Reads Excel File Check The submission must contain the following functions or keywords: readmatrix You must use readmatrix to get the data from the spreadsheet

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions