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
Which activity is performed during high-level design in the V-model?
SVETLANKA909090 [29]

Answer:

understanding component interaction

4 0
2 years ago
Algebraic concepts that include certain words and phrases and
Veseljchak [2.6K]

Answer:

Boolean Operators

Explanation:

When performing a boolean search, boolean operators allow users to combine keywords with operators (or modifiers) such as AND, NOT and OR to further produce more relevant results.

The boolean operators AND and OR are used to include certain words and phrases during the search while the  boolean operator NOT is used to exclude certain words and phrases.

6 0
3 years ago
What is true about the dilation?
madreJ [45]

Hey hey hey! I recently took the test and the answer is D | (• ◡•)|

7 0
2 years ago
Read 2 more answers
In the __________ phase of the SecSDLC, the team studies documents and looks at relevant legal issues that could affect the desi
mina [271]

In the Analysis phase of the SecSDLC, the team studies documents and looks at relevant legal issues that could affect the design of the security solution.

<h3>What is this stage about?</h3>

This is known to be the phases of development where there is  Analysis or one can say requirements gathering and where one has clearly set out problem or project as well as others.

Note that In the Analysis phase of the SecSDLC, the team studies documents and looks at relevant legal issues that could affect the design of the security solution.

Learn more about Analysis phase from

brainly.com/question/13897351

#SPJ1

5 0
2 years ago
A transmission system at a radio station uses a/an _______ to convert a direct current into a high-frequency alternating current
xenn [34]
The answer is A. oscillator 
5 0
3 years ago
Other questions:
  • With a(n) ____ structure, you perform an action or task, and then you perform the next action in order.
    6·1 answer
  • Which part of a window lets you see a fileâs contents without opening the file?
    9·1 answer
  • Why would a brokered CD pay more than a regular CD?
    13·1 answer
  • What are some of the causes for error 1921 when updating?
    11·2 answers
  • How would you define data science ?
    10·1 answer
  • What do you call the spreadsheet cell that is in effect and has a heavier black border around it?
    7·2 answers
  • 5.17 (Calculating Sales) An online retailer sells five products whose retail prices are as follows: Product 1, $2.98; product 2,
    9·1 answer
  • Determine of population size​
    11·1 answer
  • time to throw poggers xqc time to throw pogchamp time to throw pogchamp time to throw pogchamp time to throw pogchamp time to th
    5·2 answers
  • What are the sectors of the buisness enviornment
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!