A résolu


jaya kumar
area of traingle

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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]

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 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,...

plus de 9 ans il y a

A résolu


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.

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

Charger plus