Question

*The following question requires to be answered through MATLAB* Suppose Age is the following vector: [...

*The following question requires to be answered through MATLAB*

Suppose Age is the following vector: [ 18 25 NaN 22 32 NaN ]. Write the Matlab command that counts the number of missing values represented by the value NaN. Hint: look up the functions sum and isnan

0 0
Add a comment Improve this question Transcribed image text
Answer #1

isnan gives a logical array which is 1 if ith element is NaN. Now sum this array to find the no of Nan.

Output:

Add a comment
Know the answer?
Add Answer to:
*The following question requires to be answered through MATLAB* Suppose Age is the following vector: [...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • *The following question requires to be answered through MATLAB* Write a matlab function that converts a...

    *The following question requires to be answered through MATLAB* Write a matlab function that converts a temperature (in degrees Fahrenheit) to the equivalent temperature in degrees Celcius. °C= (°F – 32) * 5/9. Note: you have to use the function keyword.

  • We are interested in analyzing fitness data for children, we have a vector or student ages,...

    We are interested in analyzing fitness data for children, we have a vector or student ages, and a second vector of corresponding student push-up counts. Here are two sample vectors you can use, but your code should work for any two vectors of the same length: ages =[14 11 14 13 14 13 12 14 11 11 12 1411 14 11 11 12 12 11 11 14 14 12 12 13 11 11 11 11 14 14 11 12 12...

  • Suppose the following data set gives the age a person first receives a winning lottery ticket....

    Suppose the following data set gives the age a person first receives a winning lottery ticket. Use JMP to answer the questions below. Use JMP to answer the questions below. 35 43 16 30 20 32 25 26 32 30 18 35 21 27 34 5 38 31 38   41 15 22 28 38 a. find P15* b. in the context of this problem, interpret P15* c. find the quartiles d. find the interquartile range e. interpret the interquartile range...

  • MATLAB MATLAB MATLAB Consider the diagram below V R$ Here, each V represents a change in...

    MATLAB MATLAB MATLAB Consider the diagram below V R$ Here, each V represents a change in voltage (in volts) at a battery, each R represents a resistance in ohms) at a resistor and each I represents a current (in amps) through a wire. These quantities obey two simple laws: 1. Ohm's law: The voltage drop across a resistor is V = IR. 2. Kirchhoff's second law: The sum of all the voltage changes in a closed loop is zero. Using...

  • Compute the following problems using Math Lab.   Instructions: Answer All Questions using MATLAB commands. Question 1....

    Compute the following problems using Math Lab.   Instructions: Answer All Questions using MATLAB commands. Question 1. Create a vector of the even whole numbers between 31 and 75. Question 2. Let x [2516] a. Add 16 to each element b. Add 3 to just the odd-index elcments c. Compute the square root of each element d. Compute the square of each element Question 3. Let x 13 268T and y [4 1 3 5] (NB. x and y should be...

  • cope the code please thanks Write a MATLAB code to obtain the following. Keep your code...

    cope the code please thanks Write a MATLAB code to obtain the following. Keep your code commented whenever required. Copy your source code and command widow outcomes and screen shots of any plots in your solution. Generate a matrix "A" as follow. A= 16 6 8 2 10 18 12 14 4 I. II. Divide the matrix A by 2 and store the result in a matrix B. Combine matrices A & B to obtain the following matrix C. Also...

  • ri R$ 7:) Here, each V represents a change in voltage (in volts) at a battery,...

    ri R$ 7:) Here, each V represents a change in voltage (in volts) at a battery, each R represents a resistance (in ohms) at a resistor and each I represents a current (in amps) through a wire. These quantities obey two simple laws: 1. Ohm's law: The voltage drop across a resistor is V = IR. 2. Kirchhoff's second law: The sum of all the voltage changes in a closed loop is zero. Using these two laws, we can construct...

  • MATLAB ONLY gauss.jpg BELOW Instructions: The following problems can be done interactively or by writing the...

    MATLAB ONLY gauss.jpg BELOW Instructions: The following problems can be done interactively or by writing the commands iın an M-file (or by a combination of the two). In either case, record all MATLAB input commands and output in a text document and edit it according to the instructions of LAB 1 and LAB 2. For problem 2, include a picture of the rank-1 approximation. For problem 3, include a picture of the rank-10 approximation and for problem 4, include a...

  • I only need Question 4 (Image above) answered. I am providing you with the rest of the questions and other information...

    I only need Question 4 (Image above) answered. I am providing you with the rest of the questions and other information for background information since it is necessary to answer Question 4. I do not need answers to Q1, 2 and 3 - only for Q4 Background information for the question: The dataset weightloss.dta contains information on 77 patients randomised to undertake one of three diets (referred to as diet A, B and C). Some background information is also available,...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT