A résolu


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

2 mois il y a

A résolu


Set defaults
Write a function that computes the volume of a cube. The function should be able to accept three inputs: the length, width, and...

2 mois il y a

A résolu


The Dark Side of the Die
It is well-known that opposite sides of a classic hexahedral die add to 7. Given a vector of dice rolls, calculate the sum of th...

2 mois il y a

A résolu


Replace all zeros and NaNs in a matrix with the string 'error'
Given a numeric input matrix A, possibly containing some zero values and some NaNs, replace any occurrences of zero or NaN with ...

2 mois il y a

A résolu


ranch area?
Your friend has a ranch with four distinct boundary lines. Three boundary lines are ideal straight roads: (1) North Club Road, (...

2 mois il y a

A résolu


Einsteinium-253 decay
Radioactive Einsteinium-253 has a half-life of 1,768,608 seconds. Given 1000mg of Einsteinium-253 at t=0 days, how much is lef...

2 mois il y a

A résolu


capable husband?
* The prospective husband must pass a background check, * and *functions* faithfully, as suggested by <http://www.mathworks.com...

2 mois il y a

A résolu


Grandpa's telescope
Two grandkids Dorothy and Benjamin are sharing a telescope made by their grandpa, who used an old lens of spectacles as the obje...

2 mois il y a

A résolu


Make a Star Pyramid
Create a star pyramid. First line will have 1 star, second will have two stars and so on... a basic program which is easily done...

2 mois il y a

A résolu


root?
* Given a function 'foo', and a position 'there', find the root near 'there'. * For example: If foo=@sin, and there=3.1, then r...

2 mois il y a

A résolu


N-Cards Problem
You have a deck of _N_ cards numbered in order from 1 to _N_. You discard the top card (card 1) and place the next card (card 2)...

2 mois il y a

A résolu


Equidistant numbers containing certain value in an interval
Given a lower and upper bound of an interval, distance between numbers, and one particular number from that interval, create an ...

2 mois il y a

A résolu


Pythagorean perfect squares: find the square of the hypotenuse and the length of the other side
Given the square root of a square number, *seed*, and a range, *n*, find the square number, *Z* as well as the other side, *y*, ...

2 mois il y a

A résolu


Don't Sum a Five
Create a function that sums the first and last element of a muti-element vector unless the value of one of the elements is 5. Do...

2 mois il y a

A résolu


Don't Include a Five (Part Two)
Given a vector A with at least one non-five, return vector B, with all fives excluded (not replaced by zeros).

2 mois il y a

A résolu


High Five!
Write a function that takes a number x and returns y = 'High Five' if x is not equal to five. Return y = 'Denied' if the number ...

2 mois il y a

A résolu


A Five Introduction
Write a function that takes a number x as an input and returns the same value as y, unless x = 5, in which case the function sho...

2 mois il y a

A résolu


Vector to 3-Column Matrix
Consider a vector *A* such as A = [1 2 3 3 4 5 6] Can you convert this vector to a three-column matrix like this: ...

2 mois il y a

A résolu


Maximum of each diagonal
The well-known <http://www.mathworks.com/help/matlab/ref/max.html max> function can operate along either the rows or the columns...

2 mois il y a

A résolu


Create cell array of strings
Convert the input to a cell array, but only if necessary. If the input is a string, return a 1-by-1 cell array containing the...

2 mois il y a

A résolu


Volume difference between Ellipsoid and Sphere
Given an ellipsoid of semi principal axis (a,b,c) find the volume of the difference between this ellipsoid and the sphere with...

2 mois il y a

A résolu


ICFP2024 006: Lambda 21 - 3D
The ICFP2024 contest was held June29 thru July 1. The contest consisted of five parts: ICFP Language, Lambdaman maze, Starship f...

2 mois il y a

A résolu


Zero Cross
Write a function that counts the number of times n a signal x changes sign. Examples x = [1 2 -3 -4 5 6 -7 8 -9 10 11] ...

2 mois il y a

A résolu


calculate Compound Intrest
Calculate Compound Intrest for given data

2 mois il y a

A résolu


Initialize a Natural Number matrix.
Given length of matrix initialize a matrix consisting of natural numbers from 1 to n: n = 10; x = [ 1 2 3 4 5 6 7 8 9 10]; ...

2 mois il y a

A résolu


Xor of matrix
you have to set exclusive OR of two arrays

2 mois il y a

A résolu


Permutations of input vector
Find and output all permutations of given vector

2 mois il y a

A résolu


counting groups!
This problem is about counting groups. Example If you have x: x = [0.8 0.8 0.8 0.3 0.3 0.4 0.5 0.6 0.6 0.9] then a...

2 mois il y a

A résolu


Wrapping the Tower of Pisa
The famous artist Christo Vladimirov Javacheff, who likes pizza, wants to wrap the well-known Italian tower in paper. It is a ci...

2 mois il y a

A résolu


Matrix which contains the values of an other matrix A at the given locations.
If you have two matrices, which together give xc and yc coordinates into another matrix, eg : xc = [1 1 1; 2 2 1]; ...

2 mois il y a

Charger plus