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
Microsoft PowerPoint is an example of a(n) _____ application.
Daniel [21]

Answer: i'd say utility

Explanation:

3 0
3 years ago
Read 2 more answers
The _______ is a small program run by a computer when first powered on. its primary function is to stabilize the machine and dev
tigry1 [53]
Hello <span>TheCelloAlex1645 </span>

Answer: <span>The BIOS is a small program run by a computer when first powered on. its primary function is to stabilize the machine and devices on the motherboard so that the operating system can be loaded and take control of the computer.


Hope this helps
-Chris</span>
3 0
3 years ago
For each scenario, select the best solution to try from the drop-down menu. A computer will not connect to the network. An IP ad
Inessa05 [86]

Answer:

1) Check the switches, routers, and hubs.

2) Try logging off and on again.

3) Make sure everything is plugged in and turned on.

4) Restore files from backup versions.

Explanation:

Hope this helped!! :D

6 0
3 years ago
Which type of data is presented on the y-axis?
den301095 [7]
For example, if I was foong a bar graph about the amounts of what was in different jars, the x-axis would have the items in the jars, and the y-axis woukd have the amount of items in the jars
6 0
2 years ago
Read 2 more answers
Uses 128-bit addresses to uniquely identify devices connected to the internet.
riadik2000 [5.3K]
IP version 6 (IPv6).
3 0
3 years ago
Other questions:
  • You're creating a table for one of your slides, and need to make some modifications to your table structure. Which of the follow
    14·1 answer
  • HELP! Identify the parts of the table. <br>A) Primary Key<br>B) Field<br>C) Record<br>D) Table<br>​
    15·2 answers
  • When did internet came to existence?
    12·1 answer
  • A _____ is a machine that changes information from one form into another.
    7·1 answer
  • You can create a database using one of the many templates available or by creating a new ______ database.
    9·1 answer
  • Using a caesar cypher with an offset of three characters (a -&gt; d, b -&gt;e, ...., z -&gt; c), what would be the correct cyphe
    6·1 answer
  • Do u have all the subjects​
    12·2 answers
  • What are the steps for adding an action button to a slide? Choose the correct answers from the drop-down menus. 1. First, go to
    5·2 answers
  • Which symbol is used for an assignment statement in a flowchart?
    13·1 answer
  • (Giving away points!)
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!