A résolu


Convert a numerical matrix into a cell array of strings
Given a numerical matrix, output a *cell array of string*. For example: if input = 1:3 output is {'1','2','3'} whic...

7 mois il y a

A résolu


Create a cell array out of a struct
Create a cell array out of a (single) struct with the fieldname in the first column and the value in the second column: in: ...

7 mois il y a

A résolu


Diagonal Pattern
For a positive integer |n|, return an |nXn| matrix |mat| such that the value of each element in row |i| and column |j| is given ...

plus d'un an il y a

A résolu


Flip the diagonal values
Write a program that flip the elements of main diagonal , upper and lower diagonal values of a sqare matrix. For example if a ...

plus d'un an il y a

A résolu


swap sign sum & multiply castles
It is an easy problem, if you know the answer. Given a square matrix of NxN ordinary numbers. Initially place N identical indi...

plus d'un an il y a

A résolu


Swap between columns
The idea is to swap between second and second last column Ex = [1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; ...

plus d'un an il y a

A résolu


Remove a specific character with another
Remove any (-) dash sign with (_) underscore Ex = 'The-Journey-of-thoudsands-miles-starts-with-a-single-step' y = 'The_Jour...

plus d'un an il y a

A résolu


Swap between first and last
The idea is to swap between first and last row Ex = [1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; ...

plus d'un an il y a

A résolu


Swap between first and last column
The idea is to swap between first and last column Ex = [1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; 1 2 3 4 5; 1 2 3 ...

plus d'un an il y a

A résolu


Swap between rows
The idea is to swap between second and second last row Ex = [1 2 3 4 5; 5 4 3 2 1; 1 2 3 4 5; 1 2 3 4 5; ...

plus d'un an il y a

A résolu


remove every row&col for every nan
for a given matrix, remove the row and column of every nan. Example x=[1 2 NaN 4 5 6 7 8 ...

plus d'un an il y a

A résolu


Find Rows with Specift Properities
Delete rows with specific properites as following: Find rows that have a negative value in any element of the row and delete it...

plus d'un an il y a

A résolu


Remove a specific column with min value
Remove the column that contain the min value in the matrix? If you like the problem, please give it a like:)

plus d'un an il y a

A résolu


Remove a specific column with max value
Remove the column that contain the max value in the matrix? If you like the problem, please give it a like:)

plus d'un an il y a

A résolu


Remove a specific row with min value
Remove the row that contain the min value in the matrix? If you like the problem, please give it a like:)

plus d'un an il y a

A résolu


Remove a specific row with max value
Remove the row that contain the max value in the matrix? If you like the problem, please like it :)

plus d'un an il y a

A résolu


Find the sides of an isosceles triangle when given its area and height from its base to apex
Find the sides of an isosceles triangle when given its area and the height from its base to apex. For example, with A=12 and h=...

plus d'un an il y a

A résolu


Height of a right-angled triangle
Given numbers a, b and c, find the height of the right angled triangle with sides a and b and hypotenuse c, for the base c. If a...

plus d'un an il y a

A résolu


Is the Point in a Triangle?
Check whether a point or multiple points is/are in a triangle with three corners Points = [x, y]; Triangle = [x1, y1; x...

plus d'un an il y a

A résolu


Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
If p is the perimeter of a right angle triangle with integral length sides, { a, b, c }, there are exactly three solutions for p...

plus d'un an il y a

A résolu


Take it out
Consider the integer number sequence N (1 to infinity). After each iteration, take out the (k+1)th elements; where k is the n...

presque 2 ans il y a

A résolu


Sky full of stars - 03
draw the following pattern with asterisks. For example, for n=6 '************' '***** *****' '**** ****' ...

presque 2 ans il y a

A résolu


Determine pressure altitude using field elevation and altimeter setting
Given an airfield's elevation in feet (ft) and the current altimeter setting in inches of mercury (inHg), calculate the pressure...

presque 2 ans il y a

A résolu


Cricket - Represent Average in "Dulkars" and "Ses"
Sachin Tendulkar's Test average was 53.78. So if Tendulkar = 53.78, one dulkar = 5.378. Similarly, Roger Twose's average was 25....

presque 2 ans il y a

A résolu


Cricket - Career Bowling Statistics
Given a vector s of strings representing a bowler's individual innings records, return their career statistics as a 3-element (n...

presque 2 ans il y a

A résolu


Cricket - Career Batting Statistics
Given a vector s of strings representing a batter's individual innings scores, return their career statistics as a 4-element (nu...

presque 2 ans il y a

A résolu


Cricket - Average Partnership Contribution
The (infamous) Duckworth-Lewis method uses statistical models of how much each wicket partnership is worth to an innings (on ave...

presque 2 ans il y a

A résolu


Create an n-by-n null matrix and fill with ones certain positions
The positions will be indicated by a z-by-2 matrix. Each row in this z-by-2 matrix will have the row and column in which a 1 has...

presque 2 ans il y a

A résolu


Find the two most distant points
Given a collection of points, return the indices of the rows that contain the two points most distant from one another. The inpu...

presque 2 ans il y a

A résolu


Elapsed Time
Given two date strings d1 and d2 of the form yyyy/mm/dd HH:MM:SS (assume hours HH is in 24 hour mode), determine how much time, ...

presque 2 ans il y a

Charger plus