Resuelto


find the surface area of a cube
given cube side length x, find the surface area of the cube, set it equal to y

más de 7 años hace

Resuelto


Potential Energy
Calculate the potential energy of a rock.

más de 7 años hace

Resuelto


find the roots of a quadratic equation
for e.g x = [ 2 -1 -3] y = [1.5 -1]

más de 7 años hace

Resuelto


Find out sum of all elements of given Matrix
Find out sum of all elements of given Matrix A=[1 2 3;4 5 6 ;7 8 9]; Answer must be: 45 *If you like this problem, pl...

más de 7 años hace

Resuelto


Health app
A health app records a user's weight and displays the change in weight from the previous measurement to the next. Assign weightC...

más de 7 años hace

Resuelto


We love vectorized solutions. Problem 1 : remove the row average.
Given a 2-d matrix, remove the row average from each row. Your solution MUST be vectorized. The solution will be tested for ac...

más de 7 años hace

Resuelto


Penny flipping - calculate winning probability (easy)
Two players are playing a fair penny flipping game. For each flip, the winner adds one penny from the loser's collection to his/...

más de 7 años hace

Resuelto


Matlab Basics - Switching Assignments
Switch assignments for variables x and y, for example start with x = 1 and y = 3 end with y = 1 and x = 3 Do NOT simply r...

más de 7 años hace

Resuelto


construct matrix with identical rows
Input a row vector such as x=1:10. Now we need to construct a matrix with L rows,of which every row vector is a copy of x. E...

más de 7 años hace

Resuelto


Sum the 'edge' values of a matrix
Sum the 'edge' values of an input matrix (the values along the perimeter). Example [1 2 3 4 5 6 7 8 9] Output = ...

más de 7 años hace

Resuelto


Square a Number
Given an input x, return y, which is equal to the square of x.

más de 7 años hace

Resuelto


Calculate the height of an object dropped from the sky
Assume that an object is dropped from 1000 meters above the surface of the earth at time t=0. The object is dropped such that t...

más de 7 años hace

Resuelto


Create a Matrix of Zeros
Given an input x, create a square matrix y of zeros with x rows and x columns.

más de 7 años hace

Resuelto


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

más de 7 años hace

Resuelto


Remove the Zero
Given an array n, remove all zeros

más de 7 años hace

Resuelto


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

más de 7 años hace

Resuelto


Find and replaces spaces from a input string with *
For a given input string str, find how many spaces are there in the string and replace those spaces with * e.g. str = 'this is ...

más de 7 años hace

Resuelto


square number
Square a number

más de 7 años hace

Resuelto


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

más de 7 años hace

Resuelto


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

más de 7 años hace

Resuelto


Binary
Given a positive, integer n, create a function that returns the respective binary number in the form of a vector. Example: ...

más de 7 años hace

Resuelto


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]

más de 7 años hace

Resuelto


Convert Fahrenheit to Celsius
Calculate the Celsius temperature C given the Fahrenheit temperature F. Examples: Input F = 90 Output C is 32.22 I...

más de 7 años hace

Resuelto


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

más de 7 años hace

Resuelto


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

más de 7 años hace

Resuelto


Given a matrix, return the last eigen value
Given a matrix, return the first eigen value For example: x = magic(5) 17 24 1 8 15 23 5 7 14 ...

más de 7 años hace

Resuelto


Find nearest prime number less than input number
Find nearest prime number less than input number . For example: if the input number is 125, then the nearest prime number whi...

más de 7 años hace

Resuelto


Factorial Numbers
Factorial is multiplication of integers. So factorial of 6 is 720 = 1 * 2 * 3 * 4* 5 *6 Thus 6 factorial = factorial(720)....

más de 7 años hace

Resuelto


Sum the elements in either diagonal of a square matrix
Sum the elements of a square matrix that lie on either the major diagonal or anti-diagonal.

más de 7 años hace

Resuelto


Test Problem; Create a 5x5 array containing all ones
This is a test for learning the process of creating a Cody problem. The goal of this test problem will be to create an array,...

más de 7 años hace

Cargar más