Answered step by step
Verified Expert Solution
Question
1 Approved Answer
b. Calculate the average and sum of all the elements in a1. c. Create a random vector (with 47 elements) following a normal distribution (using
b. Calculate the average and sum of all the elements in a1. c. Create a random vector (with 47 elements) following a normal distribution (using morm function, look up the documentation) with a mean equal to 300 and a standard deviation equal to 50. Call it a2. d. Round a2 to zero digits, i.e. make the elements integers. (Hint: use round function). e. Write a code to select elements of a2 where: i. a2 is even. ii. a2 is not divisible by three. iii. a2 is even but is not divisible by three. Question 2: What is the mean of the vec1
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