Question: Exercises Exercise 3 . 1 Using the colon operator, create a 1 1 0 array in which the first five numbers are the odd numbers

Exercises
Exercise 3.1
Using the colon operator, create a 110 array in which
the first five numbers are the odd numbers between 1 and
9, inclusive, and the last five numbers are the even numbers
between 2 and 10, inclusive. Hint: a comma is involved.
Exercise 3.2
Create a 66 array with the randi() function. Write an
equation, using the colon operator, that retrieves the upper left
33 corner of the array.
Exercise 3.3
Create an 88 array with the randi() function. Write an
equation, using the colon operator, that creates a new array
from every other row and column in the original array.
Exercise 3.4
Create a structure called student that contains four fields:
a character array called name, an int 8 called age, a floating-
point number called GPA, and a string array called major.
Assign these fields any appropriate value. Convert the structure
to a cell array and multiply each age entry times three.
Exercise 3.5
Using a combination of structure arrays and cell arrays, imple-
ment a Matlab structure called house with the following content:
house
address
year_built
rooms
bedroom
200 sq_ft
furniture: bed, dresser, nightstand
kitchen
100 sq_ft
appliances: stove, refrigerator, dishwasher
man/woman_cave
300 sq_ft
gaming_systems: Xbox, Playstation
garage
1000 sq_ft
cars
car1
make
model
year
car2
make
model
year
Hint: Build from the smallest part to the largest.
 Exercises Exercise 3.1 Using the colon operator, create a 110 array

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!