Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

-Write a single statement to create an array with the length of each month in it

ID: 3528169 • Letter: #

Question

-Write a single statement to create an array with the length of each month in it (31, 28, 31,etc.) and store it in a variable named month_length. - Now assume you have an integer variable named current_month that contains the number of the current month. Write a statement that uses current_month and month_length to display the length of the current month. - If you have a variable named data, how can you tell if it has a single number or an array of numbers in it? Write a small piece of code that demonstrates your answer. - Write a statement to create an array of 1000 integers, all set to zero, and store this array in a variable named simulation_data. - If you want to change each element in an array, what kind of statement would you use in MATLAB to repeatedly access the array? (Just give one MATLAB keyword.) -What are the differences between a function and a script in MATLAB? List at least two differences, and describe each one. - Suppose you see this in a MATLAB script: mars(4) Is there an easy way to determine if this is a function call to a function named mars, or an array access to an array stored in mars? How would you figure this out?

Explanation / Answer

http://www.google.co.in/url?sa=t&rct=j&q=Write+a+single+statement+to+create+an+array+with+the+length+of+each+month+in+it+(31,+28,+31,etc.)+and+store+it+in+a+variable+named+month+length&source=web&cd=1&cad=rja&ved=0CDEQFjAA&url=http%3A%2F%2Fwww.cs.utsa.edu%2F~cs1063%2Flectures%2Fch07.html&ei=9bkJUeacHIqNrgfU0oHIDw&usg=AFQjCNEJItjAQAD1DdQJ_SywiJQJ4mLDCw