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
Help please, on tuesday we have oral presentation in zoom and i am afraid to speak in front of people, and i don't know what to
Lapatulllka [165]

Answer:

You should be strong, and be sure about what you want to say. Make sure when you speak it is clear, and makes sense.

Explanation:

If you don't speak up or sound like you know what you are talking about. I like to think of it as dancing. Act like you own the stage, or in your case, like you own the presentation. Also, I suggest you speak to your teacher in private, about him ignoring you. If I were you, I would look for newer friends. Ones that won't ignore you.

6 0
3 years ago
The _____, a subcortical brain structure crucially involved in storing new information in memory, is smaller in people with schi
pashok25 [27]

Answer:

The hippocampus, a subcortical brain structure crucially involved in storing new information in memory, is smaller in people with schizophrenia and their first-degree relatives (parents and siblings) than in control participants.

6 0
3 years ago
Tascake Gets Free Brainliest Because he didnt get it<br><br> Tascake Heres Brainliest
Karo-lina-s [1.5K]

Answer:

I want brainlyest though can I have it

3 0
2 years ago
Read 2 more answers
Plz help ( which is an example of a good URL?
Simora [160]

The answer is B because it is short and simple and gets you to the point

8 0
3 years ago
Read 2 more answers
How many terabytes is a 128 gigabyte SD memory card
Maksim231197 [3]

Answer:

this would be .128 terabytes

Explanation:

This would be since for a whole terabyte you need 1000 gigabytes every 1000 gigabytes is a terabyte for example let’s say you have 5250 gigabytes you would have 5.250 terabytes that simple hope this helped!

4 0
2 years ago
Read 2 more answers
Other questions:
  • To move to the most extreme right cell containing data in your worksheet, what basic key combination can you use?
    7·1 answer
  • Hardy doesn't have access to a work template, which is on the network server. What should he do?
    14·1 answer
  • How do social media sites illustrate kindness?
    15·1 answer
  • Which of the following describe a required
    7·1 answer
  • Dynamically allocatе mеmory for a DNA objеct and storе its addrеss in a variablе namеd dnaPtr
    11·1 answer
  • Expain the application areas of ICT in education sector and E-commerce​
    12·1 answer
  • Write a function:
    13·1 answer
  • State three advantages of using a printer​
    15·1 answer
  • Smart art can be used to create that highlight relationships between two items
    14·1 answer
  • MmfbfMMMMMMMMMMMMMMMMMmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!