A résolu


Remove the positive integers.
Given array,x, remove all the positive numbers and display ouput as y. Example x=[1 -2 3 -4] , output is y=[-2 -4].

plus de 2 ans il y a

A résolu


Square root of a number
Write a code that will output the square root of x.

plus de 2 ans il y a

A résolu


Annual Salary
What is the annual salary of Mr. Cody if he works 40 hours a week and gets $x per hour and a yearly bonus of $2000? (Let, 50 wee...

plus de 2 ans il y a

A résolu


Area of a circle
Given the radius x, y would be the area of a circle. Pi = 3.1416

plus de 2 ans il y a

A résolu


Matlab Basics - Create a row vector
Write a Matlab script to create a row vector of 10 consecutive numbers x = [1 2 3 4 5 6 7 8 9 10]

plus de 2 ans il y a

A résolu


Beginner's Problem - Squaring
Try out this test problem first. Given the variable x as your input, square it by two and put the result in y. Examples: ...

plus de 2 ans il y a

A résolu


Roots
Find out the roots of a given polynomial equation.Given are the coefficients of the equation.

presque 3 ans il y a

A résolu


Linear system of equations
Solve the system of equations in three variables.

presque 3 ans il y a

A résolu


Solve the set of simultaneous linear equations
Given this pair of simultaneous linear equations: 2x + 3y = 23 3x + 4y = 32 Find the solution set (x,y)

presque 3 ans il y a

A résolu


radius of a spherical planet
You just measured its surface area, that is the input.

presque 3 ans il y a

A résolu


Laws of motion 5

presque 3 ans il y a

A résolu


Laws of motion 4

presque 3 ans il y a

A résolu


Laws of motion 6

presque 3 ans il y a

A résolu


Potential energy calculation

presque 3 ans il y a

A résolu


Kinetic energy calculation

presque 3 ans il y a

A résolu


Laws of motion 2

presque 3 ans il y a

A résolu


Laws of motion 1

presque 3 ans il y a

A résolu


Unit Matrix
Given n, you should return an n-by-n unit matrix. Example: If input is n=2 then A = [ 1 0 0 1 ] If input ...

presque 3 ans il y a

A résolu


Reverse a matrix
Its simple. You have to reverse a given matrix.

presque 3 ans il y a

A résolu


Find the minimum element of the matrix
Example: If x = [3 9; 5 2] then y = 2

presque 3 ans il y a

A résolu


find the maximum element of the matrix
for e.g x = [1 2; 3 4] y = 4

presque 3 ans il y a

A résolu


Convert radians to degrees
Given input in radians, output to degrees

presque 3 ans il y a

A résolu


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

presque 3 ans il y a

A résolu


Volume and area of a sphere
Input(r) - radius Output([v,s]) - volume and area

presque 3 ans il y a

A résolu


Back to Basics - Find no. of elements in a matrix?
Let A be a m*n matrix. Find the total no. of elements in A ? (Hint - formula based) A = [1 2 3;4 5 6]; output = 6

presque 3 ans il y a

A résolu


Saving MATLAB session to a file
How to save MATLAB session to a file?

presque 3 ans il y a

A résolu


metre to feet converter
The idea is to make a converter, which exchange meters to feets. We use a factor of 1m = 3.281*1f. so 3m are equals to 9.843 m...

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

presque 3 ans il y a

A résolu


length of a vector
Find twice the length of a given vector.

presque 3 ans il y a

A résolu


Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5

presque 3 ans il y a

Charger plus