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]
2 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]2 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
You are part of the team to implement new software at XYZ Inc. The employees at XYZ Inc. trust the results of the old software p
sasho [114]

Answer:

Option (D) i.e., Parallel start up is correct option to the following question.

Explanation:

Parallel startup is also an application or software or a way of using the application of the other Operating System in others just like that the following XYZ inc. has trust on older platform but their system give them cautions for update then they use parallel set up by which they also use old software, as well as they, use the Mac's software in Windows. This strategy provides both the option of usage.

8 0
3 years ago
2.24 Write the relevant Python expression or statement, involving a list of numbers lst and using list operators and methods for
miskamm [114]

Answer:

lst = [11, 603, 99, 7, 582, 1];

print("The index of the middle element: " + str(int(len(lst)/2)))

print("The middle element: " + str(lst[int(len(lst)/2)]))

lst.sort()

sorted_lst = lst.reverse()

print("The list in descending order: " + str(lst))

first_number = lst.pop(0)

lst.append(first_number)

print("New lst: "+ str(lst))

Explanation:

- Initialize a list

- Find the middle index, int(len(lst)/2)

- Find the middle element, lst[int(len(lst)/2)]

- Sort the list in descending order (First sort the list in ascending order than reverse it)

- Get the first element using <em>pop</em> method, and append it to the end using <em>append</em> method

- - - - -

a) 0 == 1 == 2 --> Always evaluates false

b) 2 + (3 == 4) + 5 == 7 --> Evaluates true

c) 1 < -1 == 3 > 4 --> Always evaluates false

3 0
3 years ago
What is the main reason to create flash cards?
ryzh [129]

the main reason it to create flash card is the first one

5 0
3 years ago
Read 2 more answers
Why can't I access my micro SD card on my Lenovo ThinkPad Yoga 11e? I'm trying to export some PNG files onto my Micro SD card, s
BabaBlast [244]

maybe you need a new sd card

6 0
3 years ago
A company's loss control department identifies theft as a recurring loss type over the past year. Based on the department's repo
maria [59]

Answer: C) Motion detectors

Explanation:

Motion detectors is the device that is used for detection of moving object in any area. They are used for security purposes by tracking motion or people and alerting the user.It consist of motion sensor for detection of motion and alerting the users or organization about security breach through alarming .

  • According to the question,Chief information officer should implement motion detectors to investigate about theft that takes place in company's department on regular basis.Any intervention for company's loss will be alerted through tracking motion of the thief.
  • Other options are incorrect because camera is used for recording videos and images. Bio-metric device is used for digital identification of any person to enter into a system. Man-trap is vestibule used for controlling access of a person for security.
  • Thus, the correct option is option(C).
6 0
3 years ago
Other questions:
  • The Internet may best be compared to a/an
    8·1 answer
  • How is a cell named in microsoft excel 2016
    10·1 answer
  • If there is a slow internet connection or limited access to certain sites it is often better to _________ a video file before st
    9·2 answers
  • What is anatomy of software house?
    10·1 answer
  • Communication is defined as__________.
    10·1 answer
  • How do you change your age on Brainly?
    10·1 answer
  • Introduction to computing systems: from bits and gates to c and beyond
    7·1 answer
  • For current events, what type of sources would we use to learn about them?
    14·1 answer
  • With which type of test question should you leave yourself extra time to answer?
    14·2 answers
  • Write the functions of F1 to F12 on the keyboard​
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!