Risolto


Insert zeros into vector
Insert zeros after each elements in the vector. Number of zeros is specified as the input parameter. For example: x = [1 ...

oltre 6 anni fa

Risolto


Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
The given function returns the index of the maximum value in a given matrix. such as X=[4,3,4,5,9,12,0,5] Ans= 6 if maxim...

oltre 6 anni fa

Risolto


Sum of diagonal of a square matrix
If x = [1 2 4; 3 4 5; 5 6 7] then y should be the sum of the diagonals of the matrix y = 1 + 4 + 7 = 12

oltre 6 anni fa

Risolto


Replace NaNs with the number that appears to its left in the row.
Replace NaNs with the number that appears to its left in the row. If there are more than one consecutive NaNs, they should all ...

oltre 6 anni fa

Risolto


Swap two numbers
Example Input: a = 10 b = 20 Output a = 20 b = 10

oltre 6 anni fa

Risolto


Perimeter of a semicircle
Given the diameter d, find the perimeter of a semicircle

oltre 6 anni fa

Risolto


Volume Pillar
Calculate the volume of a pillar with radius l and heigth ar.

oltre 6 anni fa

Risolto


Given a square and a circle, please decide whether the square covers more area.
You know the side of a square and the diameter of a circle, please decide whether the square covers more area.

oltre 6 anni fa

Risolto


Back to basics 6 - Column Vector
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector, output true or false whether it is a colu...

oltre 6 anni fa

Risolto


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

oltre 6 anni fa

Risolto


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

oltre 6 anni fa

Risolto


find radius of cone
if Slant height of Cone(I)& hight of Cone(H) given then find radius of the Cone(R) for example I=5,h=4 then the ans R=3;

oltre 6 anni fa

Risolto


Cannon Ball
Given g (acceleration due to gravity) and desired altitude x, find the minimum ground velocity of a cannon ball to reach x.

oltre 6 anni fa

Risolto


Back to basics 7 - Equal NaNs
Covering some basic topics I haven't seen elsewhere on Cody. Given 2 input variables, output true if they are equal, false ot...

oltre 6 anni fa

Risolto


Matlab Basics II - Extract last 3 elements of a vector
Let x be a vector of unknown length, we are always interested in the last 3 numbers in the vector, write a function that gives t...

oltre 6 anni fa

Risolto


Matlab Basics II - Intervals
Write a function that takes an interval from a to b, and divides it into 5 parts example: a = 1, b = 2 output = 1 1.25 ...

oltre 6 anni fa

Risolto


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

oltre 6 anni fa

Risolto


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]

oltre 6 anni fa

Risolto


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

oltre 6 anni fa

Risolto


Matlab Basics - Convert a row vector to a column vector
Write a script to convert a row (e.g. x = [1 2 3]) to a column (e.g. y = [1;2;3]), your script should be able to do this for any...

oltre 6 anni fa

Risolto


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

oltre 6 anni fa

Risolto


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

oltre 6 anni fa

Risolto


The sum of the numbers in the vector
eg. [1,2,3]---->SUM=6

oltre 6 anni fa

Risolto


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

oltre 6 anni fa

Risolto


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

oltre 6 anni fa

Risolto


surface of a spherical planet
you just discovered its circumference, that is the input.

oltre 6 anni fa

Risolto


Find the hypotenuse
Given a and b (the two sides of a right-triangle), find c, the hypotenuse.

oltre 6 anni fa

Risolto


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

oltre 6 anni fa

Risolto


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

oltre 6 anni fa

Risolto


Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

oltre 6 anni fa

Carica altro