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
solniwko [45]
3 years ago
11

Modify an array's elements Write a for loop that iterates from 1 to numberSamples to double any element's value in dataSamples t

hat is less than minValue. Ex: If minVal = 10, then dataSamples = [2, 12, 9, 20] becomes [4, 12, 18, 20]. Function Save Reset MATLAB DocumentationOpens in new tab function dataSamples = AdjustMinValue(numberSamples, userSamples, minValue) % numberSamples: Number of data samples in array dataSamples % dataSamples : User defined array % minValue : Minimum value of any element in array % Write a for loop that iterates from 1 to numberSamples to double any element's % value in dataSamples that is less than minValue dataSamples = userSamples; end 1 2 3 4 5 6 7 8 9 10 Code to call your function
Computers and Technology
1 answer:
ValentinkaMS [17]3 years ago
3 0

Answer:

See explaination for program code

Explanation:

%save as AdjustMinValue.m

%Matlab function that takes three arguments

%called number of samples count, user samples

%and min vlaue and then returns a data samples

%that contains values which are double of usersamples

%that less than min vlaue

%

function dataSamples=AdjustMinValue(numberSamples, userSamples, minValue)

dataSamples=userSamples;

%for loop

for i=1:numberSamples

%checking if dataSamples value at index,i

%is less than minValue

if dataSamples(i)<minValue

%set double of dataSamples value

dataSamples(i)= 2*dataSamples(i);

end

end

end

Sample output:

Note:

File name and calling method name must be same

--> AdjustMinValue(4, [2,12,9,20],10)

ans =

4 12 18 20

You might be interested in
Your organization network diagram is shown in the figure below. Your company has the class C address range of 199.11.33.0. You n
user100 [1]

Answer:

aaaa

Explanation:

6 0
3 years ago
Python: Bad input on line 8. What is the fix, please can someone tell me I’m desperate?
JulijaS [17]

Answer: use GitHub or stack over flow or

repl. it

Explanation:

8 0
3 years ago
In Microsoft Word you can access the _______ command from the "Mini toolbar." 
ValentinkaMS [17]
Hello, Good Works mate!

Answer: 
save as
*You can access the Save As command on the Mini Toolbar.
6 0
3 years ago
Which type of information should never be given out on social media?
zhenek [66]

Answer:

Sites like Face.book are full of valuable data for people who use social engineering to steal your identity on social media. You should therefore avoid sharing information that's used to verify your identity,

Explanation:

7 0
3 years ago
Read 2 more answers
Define a JavaScript function named showGrades which does not have any parameters. Your function should create and return an arra
grandymaker [24]

Answer:

see explaination

Explanation:

//selective dev elements by id name

var gradeA = document.querySelector("#GradeA");

var passing = document.querySelector("#Passing");

var learning = document.querySelector("#Learning");

//function showGrades

function showGrades() {

var arr = [];

//converting string to int and inserting into array

arr[0] = parseInt(gradeA.textContent);

arr[1] = parseInt(passing.textContent);

arr[2] = parseInt(learning.textContent);

//creating json blob

var blob = new Blob(new Array(arr), {type:"text/json"});

return blob;

}

8 0
3 years ago
Other questions:
  • What tasks does google do?
    5·1 answer
  • How do u use this app?
    15·2 answers
  • What is gender bias?
    9·1 answer
  • Fill in the blank with the correct term.
    10·2 answers
  • Fre.e points enjoy em
    7·2 answers
  • To obtain your class E learner license, youll need too _
    9·1 answer
  • Assume that students in a course are required to produce a written report on an ICT-related
    14·1 answer
  • What is the most used gaming keyboard in 2022?
    8·1 answer
  • During the ___ phase of a software development project, members broadly define the features that the software should include
    15·1 answer
  • Which statement refers to a computer software
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!