Risolto


Ned's Queens
A tribute to Cody's five-year anniversary should also celebrate the people behind Cody, and in this particular case, our illustr...

quasi 9 anni fa

Risolto


Group-wise Euclidean distance
*Input*: * *x* —— An array of size *n-by-d*, where each row vector denotes a point in a d-dimensional space; * *g* —— A gro...

quasi 9 anni fa

Risolto


The 5th Root
Write a function to find the 5th root of a number. It sounds easy, but the typical functions are not allowed (see the test su...

quasi 9 anni fa

Risolto


collision
several cars (n) were involved in this collision, the input matrix (vm) has n rows and two columns, first column for velocity an...

quasi 10 anni fa

Risolto


Given a matrix, return the last eigen value
Given a matrix, return the first eigen value For example: x = magic(5) 17 24 1 8 15 23 5 7 14 ...

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


Check bounds
Assign inRange with 1 if userWeight is greater than 100 and less than or equal to 200.

quasi 10 anni fa

Risolto


Multiple if statements
Write an if-statement that subtracts 5 from outputValue if amplitudeResponse is greater than 10. Write a second if-statement tha...

quasi 10 anni fa

Risolto


Colon operator of two vectors
You are given two vectors of equal length: VecStart, VecEnd Each vector contain a set of integers, where VecEnd(j)>=VecStar...

quasi 10 anni fa

Risolto


Sum the entries of each column of a matrix which satisfy a logical condition.
Given a numeric matrix A and a logical array L of the same size as A, return a row vector S containing the columnwise sums of th...

quasi 10 anni fa

Risolto


Perfect Square or not
find Given input x is perfect square or not,if yes then output y=1.else y=0

quasi 10 anni fa

Risolto


Sum the elements in either diagonal of a square matrix
Sum the elements of a square matrix that lie on either the major diagonal or anti-diagonal.

quasi 10 anni fa

Risolto


Assignment statements based on input value
Write an if-else statement that assigns finalValue with userValue + 5 if userValue is greater than 100. Otherwise assign finalVa...

quasi 10 anni fa

Risolto


Dosage by weight
A machine administer's medication dosage based on weight. Write an if-elseif-else statement that assigns the appropriate dosageA...

quasi 10 anni fa

Risolto


For loops: Savings account
The for loop calculates the amount of money in a savings account after numberYears given an initial balace of savingsBalance and...

quasi 10 anni fa

Risolto


How many jokers?
* Given DNA codes of a group of suspects, * and a code for certain types of jokers, * Count how many jokers of that type. * ...

quasi 10 anni fa

Risolto


Find number of days
The input is two date in string format (dd-mm-yyyy) find out the number of days between these two dates. Example: input: ...

quasi 10 anni fa

Risolto


Find Index of maximum Value and maximum Value of a vector
Find the Index of the first occurrence of the maximum value in a vector and also the maximum value in the vector. Example: [...

quasi 10 anni fa

Risolto


Remove from a 2-D matrix all the rows that contain at least one element less than or equal to 4
Example: in = magic(5) in = 17 24 1 8 15 23 5 7 14 16 4 6 13 20 ...

quasi 10 anni fa

Risolto


N-Queens Checker
Picture a chessboard populated with a number of queens (i.e. pieces that can move like a queen in chess). The board is a matrix,...

quasi 10 anni fa

Risolto


Preset rpm speeds
A centrifuge has four preset speeds. Write a switch statement that assigns rpmSetting with the appropriate rpm speed given prese...

quasi 10 anni fa

Risolto


Woodall number
Test whether the input is a Woodall number: <http://en.wikipedia.org/wiki/Woodall_number> _Please do not cheat by simply chec...

quasi 10 anni fa

Risolto


Find nearest prime number less than input number
Find nearest prime number less than input number . For example: if the input number is 125, then the nearest prime number whi...

quasi 10 anni fa

Risolto


Symmetry of vector
Determine whether the vector is symmetric or not (vector could be even or odd in length). For example: x = [1 2 3 3 2 1] ...

quasi 10 anni fa

Risolto


For loops: Odds sum
Write a for loop that assigns summedValue with the sum of all odd values from 1 to userNum. Assume userNume is always greater th...

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


Change the sign of even index entries of the reversed vector
change the signs of the even index entries of the reversed vector example 1 vec = [4 -1 -2 9] ans = [9 2 -1 -4] example2...

quasi 10 anni fa

Risolto


Sum of first n terms of a harmonic progression
Given inputs a, d and n, return the sum of the first n terms of the harmonic progression a, a/(1+d), a/(1+2d), a/(1+3d),....

quasi 10 anni fa

Risolto


Matlab Basics - Rounding II
Write a script to round a variable x to 3 decimal places: e.g. x = 2.3456 --> y = 2.346

quasi 10 anni fa

Risolto


Generate pi using logarithm
Generate pi using logarithm

quasi 10 anni fa

Carica altro