Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Exercises Exercise 3 . 1 Using the colon operator, create a 1 times 1 0 array in which the first five numbers are the
Exercises Exercise Using the colon operator, create a times array in which the first five numbers are the odd numbers between and inclusive and the last five numbers are the even numbers between and inclusive Hint: a comma is involved. Exercise Create a times array with the randi function Write an equation, using the colon operator, that retrieves the upper left times corner of the array. Exercise Create an times 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 Create a structure called student that contains four fields: a character array called name, an int 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 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 sq ft furniture: bed, dresser, nightstand kitchen sq ft appliances: stove, refrigerator, dishwasher man woman cave sq ft gaming systems: Xbox, Playstation garage sq ft cars car make model year car make model year Hint: Build from the smallest part to the largest.
Exercises
Exercise
Using the colon operator, create a
times
array in which
the first five numbers are the odd numbers between
and
inclusive and the last five numbers are the even numbers
between
and
inclusive Hint: a comma is involved.
Exercise
Create a
times
array with the randi
function Write an
equation, using the colon operator, that retrieves the upper left
times
corner of the array.
Exercise
Create an
times
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
Create a structure called student that contains four fields:
a character array called name, an int
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
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
sq
ft
furniture: bed, dresser, nightstand
kitchen
sq
ft
appliances: stove, refrigerator, dishwasher
man
woman
cave
sq
ft
gaming
systems: Xbox, Playstation
garage
sq
ft
cars
car
make
model
year
car
make
model
year
Hint: Build from the smallest part to the largest.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started