Solved


What is Sum Of all elements of Matrix
Given the matrix x, return the sum of all elements of matrix. Example: Input x = [ 1 2 0 0 0 0 6 9 3 3 ] ...

10 years ago

Solved


sinus function
x is the abscissa. find the absolute value of cosine of -x and the same value with changed sign.

10 years ago

Solved


Finding perimeter of a rectangle
A rectangle has a length of x centimeters and a width of w centimeters. Find the perimeter.

10 years ago

Solved


square number
Square a number

10 years ago

Solved


Sum function: Counting cookies
Row array troopCookieSales contains the number of boxes of cookies sold by each troop member. Assign totalSales with the sum of ...

10 years ago

Solved


Determine the mean of matrix
Determine the mean of matrix without using mean function Hint: use simple algorithm

10 years ago

Solved


Matlab Basics II - squares
Write a function that takes matrix A, and squares each element in the matrix example: A = [1 2 3] output = [1 4 9]

10 years ago

Solved


Matlab Basics II - Count rows in a matrix
Write a function that returns that number of rows in a vector or matrix x example: x = [1; 2; 3] output = 3

10 years ago

Solved


Create a vector
Create a vector from 0 to n by intervals of 2.

10 years ago

Solved


Area of a circle
Find the value for area of the circle if diameter is given

10 years ago

Solved


Matlab Basics II - Minimum
Write a function that returns the minimum of each ROW of a matrix x example: x = [1 2 3; 4 5 6]; output [1;4];

10 years ago

Solved


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

10 years ago

Solved


Array of Ones
Create a 100 X 100 array of ones.

10 years ago

Solved


Times 3 problem
When you enter the number, it should return the number multiplied by 3

10 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...

10 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...

10 years ago

Solved


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

10 years ago

Solved


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

10 years ago

Solved


Symmetry of vector
Determine whether the vector is symmetric or not (vector could be even or odd in length). For example: x = [1 2 3 3 2 1] ...

10 years ago

Solved


Assignment statements based on input value
Write an if-else statement that assigns finalValue with userValue + 5 if userValue is greater than 100. Otherwise assign finalVa...

10 years ago

Solved


Generate pi using logarithm
Generate pi using logarithm

10 years ago

Solved


Check bounds
Assign inRange with 1 if userWeight is greater than 100 and less than or equal to 200.

10 years ago

Solved


Multiply by 3
Given the variable x as your input, multiply it by three and put the result in y.

10 years ago

Solved


For loops: Odds sum
Write a for loop that assigns summedValue with the sum of all odd values from 1 to userNum. Assume userNume is always greater th...

10 years ago

Solved


Preset rpm speeds
A centrifuge has four preset speeds. Write a switch statement that assigns rpmSetting with the appropriate rpm speed given prese...

10 years ago

Solved


Bridge toll
Complete the example to calculate finalToll. The base toll for a bridge is baseToll. If the vehicle's weight is over 5,000 pound...

10 years ago

Solved


Food safety
Assign safeTemperature with 1 if foodTemperature is less than 40 or greater than 165.

10 years ago

Solved


Writing a while loop
Write a while loop that continues to increment userValue by 5 until userValue is less than 0.

10 years ago

Solved


Basic arrays operations.
Apply element-by-element binary operation 'fun' to two arrays (A and B).

10 years ago

Solved


Switch matrix to a column vector
for e.g. x = [1 2 3 4] y = 1 3 2 4

10 years ago

Load more