A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


square number
Square a number

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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]

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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];

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


Generate pi using logarithm
Generate pi using logarithm

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

Charger plus