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

Double colon operator: Increment by x Construct a row array countValues from 0 to 25, elements incremented by incrementValue. Ex

: If incrementValue is 5, countValues should be [0, 5, 10, 15, 20, 25]. Function Save Reset MATLAB DocumentationOpens in new tab function countValues = CreateArray(incrementValue) % incrementValue: Amount each element in countValue is incremented by % Create a row array countValues from 0 to 25, % elements incremented by incrementValue countValues = 0; end 1 2 3 4 5 6 7 8 Code to call your function Reset CreateArray(5) 1 Run Function
Engineering
1 answer:
Anton [14]3 years ago
7 0

Explanation:

In Matlab, we can create a function that constructs a row array countValues from 0 to 25, with elements incremented by a incrementValue, this can be done in two ways;

If the value of IncrementValue is hard-coded than it will only work for IncrementValue=5, on the other hand, if the value of IncrementValue is not hard-coded than we can call CreateArray() with different IncrementValue.

1. Increment Value is hard-coded

function countValues = createArray(IncrementValue)

IncrementValue = 5;

countValues = 0:IncrementValue:25;

disp(countValues)

end

Output:

CreateArray(5)

ans =      0     5    10    15    20    25

2. Increment Value is not hard-coded

function countValues = createArray(IncrementValue)

countValues = 0:IncrementValue:25;

disp(countValues)

end

Output:

CreateArray(5)

ans =      0     5    10    15    20    25

CreateArray(2)

ans =      0     2     4     6     8    10    12    14    16    18    20    22    24

CreateArray(10)

ans =       0    10    20

You might be interested in
What is the governing ratio for thin walled cylinders?
Ann [662]

Answer:

The governing ratio for thin walled cylinders is 10 if you use the radius. So if you divide the cylinder´s radius by its thickness and your result is more than 10, then you can use the thin walled cylinder stress formulas, in other words:

  • if \frac{radius}{thickness} >10 then you have a thin walled cylinder

or using the diameter:

  • if \frac{diameter}{thickness} >20 then you have a thin walled cylinder
3 0
3 years ago
Resolver em c as equações:<br><br> Z elevado à 2 igual a 3+4i
Marrrta [24]

Answer:

Quando um (ou todos) os outros coeficientes de uma equação do segundo grau são iguais a zero, essa equação é chamada incompleta. Neste artigo, analisaremos os métodos que podem ser usados para resolver equações incompletas, no caso em que o coeficiente C = 0, ou seja, o coeficiente é nulo.

Explanation:

Um lado da equação será a potência e outro, o número inteiro. De outro modo, transforme a equação deixando-a isolada em um dos lados. Reescreva a equação. Prepare-a a fim de extrair o logaritmo de ambos os lados, que é o inverso da potência. Você pode calcular o logaritmo de base.

3 0
3 years ago
Could a volcanic eruption suddenly bury a city and its inhabitants? (Plz explain to me)
andrezito [222]
Yes a volcanic eruption can suddenly bury a city ! if you look up some stuff on pompeii you can learn more
7 0
3 years ago
A cylindrical specimen of cold-worked steel has a Brinell hardness of 250.(a) Estimate its ductility in percent elongation.(b) I
koban [17]

Answer:

A) Ductility = 11% EL

B) Radius after deformation = 4.27 mm

Explanation:

A) From equations in steel test,

Tensile Strength (Ts) = 3.45 x HB

Where HB is brinell hardness;

Thus, Ts = 3.45 x 250 = 862MPa

From image 1 attached below, for steel at Tensile strength of 862 MPa, %CW = 27%.

Also, from image 2,at CW of 27%,

Ductility is approximately, 11% EL

B) Now we know that formula for %CW is;

%CW = (Ao - Ad)/(Ao)

Where Ao is area with initial radius and Ad is area deformation.

Thus;

%CW = [[π(ro)² - π(rd)²] /π(ro)²] x 100

%CW = [1 - (rd)²/(ro)²]

1 - (%CW/100) = (rd)²/(ro)²

So;

(rd)²[1 - (%CW/100)] = (ro)²

So putting the values as gotten initially ;

(ro)² = 5²([1 - (27/100)]

(ro)² = 25 - 6.75

(ro) ² = 18.25

ro = √18.25

So ro = 4.27 mm

6 0
4 years ago
What should you consider when choosing a shotgun as a firearm?
AnnyKZ [126]
Make sure you meet any minimum legal requirements for caliber, gauge, or the amount of energy produced by the projectile.
7 0
2 years ago
Other questions:
  • If a pendulum takes 2 sec to swing in each direction, find the period and the frequency of the swing
    15·1 answer
  • To measure the voltage drop across a resistor, a _______________ must be placed in _______________ with the resistor. Ammeter; S
    9·1 answer
  • If a motorist moves with a speed of 30 km/hr, and covers the distance from place A to place B
    13·1 answer
  • Rod of steel, 200 mm length reduces its diameter (50 mm) by turning by 2 mm with feed speed 25 mm/min. You are required to calcu
    8·1 answer
  • On a supply and demand graph, equilibrium is the point where
    8·1 answer
  • How long...you...novels? A. Have/write B. Do/write C. Have/written D. Did/go
    8·2 answers
  • For a small company it's usually best to keep the corporate and brand image as___ as possible​
    9·1 answer
  • The metal control joints used to relieve stresses caused by expansion and contraction in large ceiling or wall expenses in inter
    8·1 answer
  • Which explanation best summarizes what went wrong during Paul’s cost analysis?
    14·1 answer
  • The purpose of the pin-indexing system for compressed gas cylinders is to: Select one: A. ensure that the correct regulator is u
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!