Problem


struct2values()
Convert a struct object into a column vector. You can assume that the struct elements are scalars Example: a = struct();...

9 years ago | 0 | 34 solvers

Solved


Pointwise multiplication of vectors.
Pointwise multiplication of vectors x and y. Example x= [1 3 5 7 9 11 13 15 17 19] y=[ 1 4...

9 years ago

Solved


Display positive elements of matrix.
Display positive elements of matrix.

9 years ago

Solved


Сoncatenate two strings.
Сoncatenate two strings. Example s1='Hello' s2='world' result='Hello world'

9 years ago

Solved


Compare two strings.
Compare two strings, whether they are equal or not.

9 years ago

Solved


Solve expression I
Solve expression (1+sin(x))/cos(x)+cos(x)/(1+sin(x)) for given vector x.

9 years ago

Solved


Set x value to each odd index of vector y.
Set x value to each odd index of vector y.

9 years ago

Solved


Delete x value in given vector y.
Delete x value in given vector y. Exapmle x=5; y=[ 1 2 5 6 74 5 2 5] result=[1 2 6 74 2]

9 years ago

Solved


Find hen's weight.
If hen weights x kilos on two legs, how much does it weights on one leg? Output the result.

9 years ago

Solved


Lightning strike distance: Writing a function
Write a function named LightningDistance that outputs "distance" given input "seconds". Seconds is the time from seeing lightnin...

9 years ago

Solved


Function call: Kilometers to miles
Assign rateMPH with the corresponding rate in miles per hour given a user defined rateKPH, which is a rate in kilometers per hou...

9 years ago

Solved


Fill a zeros matrix
The aim is to fill an array of all zeros given a numerical value and the index of row and columns for this value. 3 Inputs: ...

9 years ago

Solved


Calculate the derivative of a polynomial
Example: in = [ 1 1 1 ] out = [ 2 1 ]

9 years ago

Solved


If-then-else
Complete the function below such that if the value of x is in the range 10 to 14, inclusive, the value 18 is assigned to y. Oth...

9 years ago

Solved


Is the Point in a Circle?
Check whether a point or multiple points is/are in a circle centered at point (x0, y0) with radius r. Points = [x, y]; c...

9 years ago

Solved


Populating an array with a for loop
Write a for loop to populate multiplicationTable with the multiples of baseValue from 0 to 5. Ex: If baseValue is 2, then mu...

9 years ago

Solved


Number of pennies
Complete the function ConvertToPennies() so that the function returns the total number of pennies given a number of dollars and ...

9 years ago

Solved


Matlab Basics II - Free Fall
An object freely falling from rest under gravity covers a distance x given by: x = 1/2 gt^2 write a function that calculat...

9 years ago

Solved


Writing a recursive math function
Complete the recursive function RaiseToPower(). Ex: If userBase is 2 and userExponent is 4, then raisedValue is assigned wit...

9 years ago

Solved


Returning a "greater than" vector
Given a vector, v, return a new vector , vNew, containing only values > n. For example: v=[1 2 3 4 5 6] n=3 vNew =...

9 years ago

Solved


Replacing a row
For matrix G=[1 2 3; 4 5 6; 7 8 9] Replace the 2nd row with 8s **remember to create matrix G

9 years ago

Solved


reverse string
input='rama' output='amar'

9 years ago

Solved


Vectorizing, too easy or too hard?
Please insert a . before any ^, * or / in the string. That's it!!

9 years ago

Solved


Convert letters to Greek letter
Write a switch statement that checks origLetter. If origLetter is 'a' or 'A', assign greekLetter with 'Alpha'. If origLetter is ...

9 years ago

Solved


System of equations
Find a solution to a system of equations represented by a |n| by |n+1| matrix. For instance, [ 2 0 4; => 2*x = 4 ...

9 years ago

Solved


Writing a function: MaxValue()
Write a local function named MaxValue that returns the maximum of two inputs numA and numB.

9 years ago

Solved


Equality check: Number of bricks
Write an if statement that assigns deliveryComplete with 1 if bricksDelivered is equal to bricksExpected.

9 years ago

Solved


Negative Infinity
Round the given array a towards negative infinity.

9 years ago

Solved


collision
several cars (n) were involved in this collision, the input matrix (vm) has n rows and two columns, first column for velocity an...

9 years ago

Solved


Volume of a box
Given a box with a length a, width b, and height c. Solve the volume of the box.

9 years ago

Load more