Gelöst


jaya kumar
area of traingle

fast 10 Jahre vor

Gelöst


Determine if a row vector has NaN
Determine if a row vector x has NaN

fast 10 Jahre vor

Gelöst


given number is power of n or not?
Check weather The input is power of n or not? for example x=8,n=2 --> true x=6,n=2 --> false

fast 10 Jahre vor

Gelöst


Dice roll - opposite faces
For this problem, you will be provided with the values of a dice roll (regular six-sided dice). The number of dice will be at le...

fast 10 Jahre vor

Gelöst


Vertically stack two vectors
Stack two vectors on top of each-other so that... if A = [1 5 3] and B = [8 6 4] then C = [1 5 3 ; 8 6 4]

fast 10 Jahre vor

Gelöst


Calculate trends in time series
Create a new variable that has trends in input series. If _t+1_ is bigger than or equal to _t_, than trend in _t_ will be 1, oth...

fast 10 Jahre vor

Gelöst


Remove All elements less than 5
Given an input vector x, remove all elements of x less than 5 . Example: Input x = [ 1 2 5 7 3 ] Output y is [ 5 7 ...

fast 10 Jahre vor

Gelöst


string comparision
compare two strings if both are same return 1 else return 0

fast 10 Jahre vor

Gelöst


Calculate volume of box
Calculate the volume of box,hiven its sides

fast 10 Jahre vor

Gelöst


While loop with branching
Write a while loop that adjusts userValue while userValue is less than 0 or greater than 80. If userValue is greater than 80, th...

fast 10 Jahre vor

Gelöst


Insect population
An insect population doubles every generation. * Write a while loop that iterates numGeneration times. * Write a statment ...

fast 10 Jahre vor

Gelöst


Double summation
Write two nested for loops to calculate the following double summation: <<https://drive.google.com/uc?id=0B74PAULDIwwsWFhlNTV...

fast 10 Jahre vor

Gelöst


Populating an array with a for loop
Write a for loop to populate multiplicationTable with the multiples of baseValue from 0 to 5. Ex: If baseValue is 2, then mu...

fast 10 Jahre vor

Gelöst


Finding values in arrays
Assign numMatches with the number of elements in userValues that equal matchValue. Ex: If matchValue = 2 and userVals = [2, ...

fast 10 Jahre vor

Gelöst


Modify an array's elements using other elements
Write a for loop that sets each array element in bonusScores to the sum of itself and the next element, except for the last elem...

fast 10 Jahre vor

Gelöst


Travel speed
Write an anonymous function to compute the Euclidean distance given two points (x1, y1) and (x2, y2). Use the following equation...

fast 10 Jahre vor

Gelöst


Matrix FUN
Given a Matrix M, find out the number of elements of matrix that are divisible by 3. M = [1 2 3;4 5 6;7 8 9]; ou...

fast 10 Jahre vor

Gelöst


Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


For a given linear index as input for n sized square matrix, find corresponding row and column.
If input is 1, the row and column will be 1 and 1 respectively.

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


Small aircraft weight limit
Write an if-else statement that evaluates to true if the sum of passengerWeight and cargoWeight is less than or equal maxWeight....

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


What's the missing interior angle?
I'm talking about polygons... The sum of the interior angles of a triangle is 180 degrees. The sum of the interior angles of a...

fast 10 Jahre vor

Gelöst


Find the nearest prime
Given a positive integer 'n', the task is to find a prime number greater than or equal to 'n'. Example 1 If given 'n' is ...

fast 10 Jahre vor

Gelöst


Approximate e
Given a and n, compute and approximation to f = a * e ^ n, without the use of exp, string operations, or floating point numbers....

fast 10 Jahre vor

Gelöst


Lambert's W
Matlab cody does not support lambertw. Try to create a lambert's w function yourself. Lambert's W is the function that solves...

fast 10 Jahre vor

Gelöst


Coefficients and vertex of a parabola given 3 points
Given 3 points, each defined by x and y, compute the coefficients: [a,b,c] of a parabola with equation: y = ax^2 + bx + c passin...

fast 10 Jahre vor

Gelöst


Wien's displacement law
Given the black body temperature (in *Celsius*), output the weavelength (in *meters*) at which the radiation peaks, according to...

fast 10 Jahre vor

Gelöst


Isothermal Expansion
Given the initial pressure and volume of an ideal gas, calculate the new volume, given the new pressure. Hint: <https://en.wi...

fast 10 Jahre vor

Mehr laden