Resuelto


jaya kumar
area of traingle

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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]

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

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

casi 10 años hace

Resuelto


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.

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Cargar más