A résolu


Differential equation and events
You have to solve the non-linear time variant differential equation: (cos(y)+2)*y''+atan(y)*sin(0.01*t)^2+y*sin(0.5*t)=0 ...

plus de 5 ans il y a

A résolu


Look Up Mapping
Let the input is A = {[] [] [] [1] []}; B = {'A','B','C','D','E'}; Mapped Output = 'D';

plus de 5 ans il y a

A résolu


Counting the Grand Primes
A grand prime pair is a pair of primes, p1 and p2=p1+1000, such that both numbers are prime. Like a twin prime pair, where the d...

plus de 5 ans il y a

A résolu


Pseudo Square Root (Inspired by Project Euler 266)
Shamelessly copied from the Project Euler page for Problem 266: ------------- The divisors of 12 are: 1,2,3,4,6 and 12. T...

plus de 5 ans il y a

A résolu


Nth roots of unity
First, find the n nth roots of unity. eg if n = 6, find the n distinct (complex) numbers such that n^6 = 1. <https://en.wiki...

plus de 5 ans il y a

A résolu


Project Euler: Problem 14, Longest Collatz sequence
The following iterative sequence is defined for the set of positive integers: n → n/2 (n is even) n → 3n + 1 (n is odd) U...

plus de 5 ans il y a

A résolu


Angle difference between Hour Hand and Minute Hand of clock
*Calculate the difference of angles between Hour hand and Minute hand of clock* E.g. 1) At 12:00 Angle Difference = 0 deg...

plus de 5 ans il y a

A résolu


Vector addition
Given two row vectors, v1 and v2, each representing an integer, such that the vector elements are the digits from left to right,...

plus de 5 ans il y a

A résolu


Vector multiplication
Given two row vectors, v1 and v2, each representing an integer, such that the vector elements are the digits from left to right,...

plus de 5 ans il y a

A résolu


what can you get for exactly amount of money
You go to store, where each product has price. Prices are in vector s = [ 195 125 260 440 395 290] and you have amount ...

plus de 5 ans il y a

A résolu


Electrical Diode Current Calculation
In engineering, there is not always a single equation that describes a phenomenon accurately enough to be applied in all instanc...

plus de 5 ans il y a

A résolu


Euclidean inter-point distance matrix
The Euclidean distance between two points in a p-dimensional space is a really common thing to compute in the field of computati...

plus de 5 ans il y a

A résolu


Convert a vector to a lower triangular matrix
I now have a row vector and I want to convert it to a lower trilangular matrix. The rows of the lower trilangular matrix have...

plus de 5 ans il y a

A résolu


Iterative sum of digits of 2^n number
Given n, calculate the number 2^n (where n>=0) and *iterate* until the sum of the digits is a single-digit number. Example: ...

plus de 5 ans il y a

A résolu


Get factory-defined property values
Given a property name (e.g. 'AxesUnits', 'LineMarkerSize', 'UicontrolBackgroundColor'), return the factory-defined value for tha...

plus de 5 ans il y a

A résolu


Remove collinear points in a set of 2D points defining a polygon
Consider a polygon that is obtained by joining a set of 2D points whose coordinates are stored in matrix P=[x,y]. Write a functi...

plus de 5 ans il y a

A résolu


Upper Matrix in LU Decompositon
Get the Triangular Upper Matrix of the Matrix Given You cannot use built-in Matlab functions triu :)

plus de 5 ans il y a

A résolu


Area of polygon
Given the vertices in vectors X,Y, return the area of the polygon they define.

plus de 5 ans il y a

A résolu


Geometrical meaning of determinant
Given two vectors x,y, in 2D or three vectors x,y,z in 3D space, compute the area (or volume) of the parallelogram they define. ...

plus de 5 ans il y a

A résolu


Some tweaks in summation, Can you decode? :)
There are some tweaks in summation that you might observe via test suites Try if you can

plus de 5 ans il y a

A résolu


Check if a matrix is a palindrome in all directions
Check if a matrix is a palindrome both vertically and horizontally. You function will return *true* for |[1,2,1]| or |[2,7,2;...

plus de 5 ans il y a

A résolu


Maximum of ND-array
Find the maximum element of a N dimensional array. Example: A=[1 2 4 ; -20 4 10]; The maximum is 10.

plus de 5 ans il y a

A résolu


Return strings encapsulated by braces
Return all substrings that are contained within braces ({}). For example: str = 'x = rho*x{-1} + (1-rho)*y{+1}'; when...

plus de 5 ans il y a

A résolu


Put all numbers in a string inside square brackets
Examples: 'left3down2' -> 'left[3]down[2]' 'fiat500' -> 'fiat[500]'

plus de 5 ans il y a

A résolu


2D Indexes
Given in input the maximum degree P, the algorithm furnishes a ordered list of two dimensional vectors [i,j] i,j>=0 such that i+...

plus de 5 ans il y a

A résolu


Probabilities - Balls and urns - 01
The urn contains B blue balls and R red balls. Each trial consists of drawing one random ball from the urn and observing its col...

plus de 5 ans il y a

A résolu


Find the coefficients for numerical integration using Simpson's rule
For using numerical integration using Simpson's rule, we need some coefficients to be determined first. Suppose the n is the nu...

plus de 5 ans il y a

A résolu


Which coins to give
I was in shop today. I admired, how shop assistant had to think, which coins to give me. The task is we have a vector v=[0.5 0....

plus de 5 ans il y a

A résolu


Probabilities - Balls and urns - 02
The urn contains B blue balls and R red balls. Each trial consists of drawing one random ball from the urn and observing its col...

plus de 5 ans il y a

A résolu


Red and green towers
Frankie has a large number of wooden cubes, painted in red and green. He is building little towers with his cubes, by stacking t...

plus de 5 ans il y a

Charger plus