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
Genrish500 [490]
3 years ago
13

Write a function that iteratively appends random 1's and 0's to an array to form a binary number. The function returns the binar

y result when it's decimal equivalent is larger than the input number. [outArray] = potd11(inputNumber)
Computers and Technology
1 answer:
Anestetic [448]3 years ago
7 0

Answer:

function [result] = potd11(userInput)

result = [0];

d = 0;

while d < userInput

result = [result, randi([0,1])];

d = sum(result .* (2.* ones(1, numel(result))).^(numel(result)-1 :-1:0));

end

end

Explanation:

  • Initialize the variables from 0 as a starting point.
  • Use a while to run it until d is less than userInput variable.
  • Add random 1's and 0's to the array.
  • Return the binary result when it's decimal equivalent is larger than the input number.
You might be interested in
In addition to format commands that are found in the ribbon, which option is available for more extensive formatting?
eimsori [14]

Answer:

A

Explanation:

5 0
3 years ago
Scripting languages are distinguished by their ____ types.
vodomira [7]
I believe the answer is font.
3 0
3 years ago
-Define three types of user mode to kernel mode transfers?
Ivahew [28]

Answer:

 The three types of user mode to the kernel mode transferred occurred due to the:

  • It is mainly occurred due to the interrupt when, it send to the central processing unit (CPU).
  • It also occurs due to the hardware exception and when the memory is access illegally as it is divided by the zero.
  • It is mainly implemented or executed by the trap instruction as the system are basically executed by the program.
7 0
3 years ago
Which of the following is an example of an application software?
pishuonlain [190]
Word processing software
6 0
3 years ago
What key do I use to start my presentation
Len [333]

Answer:

The answer to this question is given below in this explanation section.

Explanation:

Knowing how o start a presentation is crucial if you fail to capture the audience attention right of the bat your entire presentation will flop.Few listeners will stick with you to the end and retain what you have told.

That is mildly unpleasant when you are doing an in house presentation in front of your colleagues.But can become utterly embrassing when you are presenting in front of larger audience presentation to prospective customers.

Let you have most of your presentation slides and polished up you dont check and quick and effective power point presentation design tips.Many ideas are broken into bits sized statements for your slides and complemented with visuals.The best way is to appeal and invoke certain emotions with your audience curiosity,surprise fear or good old amusements.

8 0
3 years ago
Other questions:
  • Write a function that takes an array of integers and its size as parameters and prints the two largest values in the array. In t
    5·1 answer
  • Briley has all the hardware she needs to construct a fully functional personal computer. She connects the various components and
    7·1 answer
  • Software enables users to create documents
    13·1 answer
  • customer seeks to buy a new computer for private use at home. The customer primarily needs the computer to use the Microsoft Pow
    5·1 answer
  • A file name extension provides what information about a file?
    6·1 answer
  • The most commnonly used OS is ___.<br> MS-DOS<br> Windows<br> Mac<br> Linux
    8·1 answer
  • Transborder data flow (TDF) restricts the type of data that can be captured and transmitted in foreign countries. True or False
    12·1 answer
  • How do you use switch board in the office​
    6·1 answer
  • Define the terms network, LAN, WAN, and Internet.
    11·1 answer
  • A company creates a ______by using a wireless access point (WAP) and an Internet connection. Select the two correct answers, the
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!