1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
vesna_86 [32]
3 years ago
11

What is the Matlab command to create a vector of the even whole numbers between 29 and 73?

Computers and Technology
1 answer:
Nana76 [90]3 years ago
6 0

Answer:

x = 29:73;

x_even = x(2:2:end);

Explanation:

In order to create a vector in Matlab you can use colon notation:

x = j:k

where <em>j</em> is 29 and <em>k</em> is 73 in your case:

x = 29:73

Then you can extract the even numbers by extracting the numbers with even index (2,4,6,etc.) of your vector:

x_even = x(2:2:end);

In the line of code above, we define <em>x_even</em> as all the elements of x with even index from index 2 till the end index of your vector, and an increment of 2 in the index: 2,4,6,etc.

If you want the odd numbers, just use the odd indices of your vector:

x_odd = x(1:2:end);

where <em>x_odd</em> contains all the elements of <em>x</em> with odd index from index 1 till the end index, and an increment of 2: 1,3,5,etc.

You might be interested in
Write down the reciprocal of 40​
pychu [463]

Answer:

The reciprocal is 0.4

Explanation:

To find the reciprocal of a fraction, switch the numerator and the denominator (the top and bottom of the fraction, respectively). So, simply speaking, the reciprocal of a/b is b/a. To find the reciprocal of a number, divide 1 by the number.

Example:

What is a reciprocal of 10?

The opposite of 10 is -10. The reciprocal of 10 is 110 or 0.1

6 0
3 years ago
8. Given the array String[] words, which already contains 1 or more values, write a block of code which counts and returns the n
Vikentia [17]

Answer:

Following are the code to this question:

public class Main//defining a class

{

public static void main(String[] arg)//defining main method

{

  String[] words={"Key","day", "Know", "kind"};//defining array of String words

  int x=0;//defining integer variable for count value

  for(int i=0;i<words.length;i++)//defining for loop for count value

  {

 if(words[i].startsWith("k")||words[i].startsWith("K"))//use if block to check word start from k

  x=x+1;//increment the value of x

  }

System.out.print("The number of letters which starts from k is: "+ x);//print value with message

}

}

Output:

The number of letters which starts from k is: 3

Explanation:

In this code, inside the main method an array of String "words" is defined that hold a value, and in the next step an integer variable "x" is defined, which is used to count the letters, which starts from k.

For this, a for loop is used that counts the value and in this an, if block is defined that uses the "startsWith" method to check the value and increment the value of x and at the last, it prints its value.

7 0
3 years ago
What percentage of U.S. households own a gaming console that is less than two years old?
klasskru [66]

Answer:um 20% i think

Explanation:

5 0
3 years ago
Read 2 more answers
A ________ allows users to add, remove, or edit its content. Select one: A. blog B. podcast C. wiki D. chat
riadik2000 [5.3K]

Answer: C) wiki

Explanation:

Wiki is defined as website that is used for updating, adding, eliminating and other editing activities with the help of web browser.This mechanism is a quick technique for modifying content by visitors of the website.Example-Wikipedia etc.

  • Other options are incorrect because blog, chat and podcast are not used for manipulation of content present on site through features of adding ,editing etc.
  • Thus, the correct option is option(C).
7 0
4 years ago
An outdoor products company wants to test a new website design where customers can get information about their favorite outdoor
ExtremeBDS [4]

Answer:

Option (A) is the right answer for factors.

Option (B) is the right answer for factor levels.

Explanation:

As per the scenario, the company wants to see the effect of their new website design on their customers, for which the factor of time spent on the new website is right because it gives the company to acknowledge the data of time spent by a customer on the new website.

To reach the result of the factor, we have to work on the factor level, in which we will compare the time spent on the old website and the new website because it gives the company an idea of customers preferring which website design.

8 0
3 years ago
Other questions:
  • What e-reader technology males a screen that is easy to read and extends battery life
    6·1 answer
  • The ash and dust from a volcanic eruption can cause a _______ change in the environment.
    13·1 answer
  • Plzzzzz help right answer gets Brainly
    10·1 answer
  • Why is ice even more dangerous than snow
    9·2 answers
  • The main workspace of a Windows computer is called the______
    5·1 answer
  • 1. What runs horizontally and is identified with numbers?
    12·2 answers
  • Convert each number into scientific notation.
    6·1 answer
  • A _____________ is designed for a individual user.
    9·1 answer
  • Python Question Class 11 attached below
    9·1 answer
  • A company set up controls to allow only a specific set of software and tools to install on workstations. A user navigates to a s
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!