A résolu


Square root of a number
Write a code that will output the square root of x.

presque 10 ans il y a

A résolu


Unit conversion
Convert x degree Celsius to y degree Fahrenheit.

presque 10 ans il y a

A résolu


Prime number removal
remove all prime numbers from the input e.g. input = 1 2 3 4 5 6 7 8 9 10 11 12 ...

presque 10 ans il y a

A résolu


find the Area of a rectangle
length is x width is y what is the area of the rectangle?

presque 10 ans il y a

A résolu


Zero Cross
Write a function that counts the number of times n a signal x crosses zero or changes sign. Examples x = [1 2 -3 -4 5 6 ...

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

presque 10 ans il y a

A résolu


Area of a circle
Given the radius x, y would be the area of a circle. Pi = 3.1416

presque 10 ans il y a

A résolu


Write a code that will follow the equation y = x * (x + x) * x.
If x = 5, y = 5 * (5+5) * 5 = 250

presque 10 ans il y a

A résolu


Find the inverse permutation
Given a permutation vector perm (a vector of n elements containing all the elements from 1 to n in some order), return the permu...

presque 10 ans il y a

A résolu


Free-time Equation
Given a 7-day week, an *_nc_* -number of *_tc_* -hour classes, *_ta_* -hours awake in a day, and *_tw_* -hours that you work in ...

presque 10 ans il y a

A résolu


Find longest run
Write a function longest_run that takes as input an array of 0's and 1's and outputs the length and index of the longest consecu...

presque 10 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';

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

environ 10 ans 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...

environ 10 ans il y a

A résolu


Replace values out of an interval with the lower or upper values
For a vector or matrix X and an interval [n1,n2], the function replace every element of x inferior to n1 by n1, and every elemen...

environ 10 ans il y a

A résolu


Transpose of matrix
Transpose of matrix as per test cases

environ 10 ans il y a

A résolu


Rotate Matrix @180 degree
Rotate Matrix @180 degree Example A=[8 1 6; 3 5 7; 4 9 2], then answer would be [2 9 4;...

environ 10 ans il y a

A résolu


Find the sum of n squares
What is the sum of the squares of the first n integers?

environ 10 ans il y a

A résolu


Multiply by 3
There are many ways to obtain 3 times a number. You could multiply by 3, add the number 3 times, multiply by 6 and then subtract...

environ 10 ans il y a

A résolu


Values in Array
How many values are in the array

environ 10 ans il y a

A résolu


Block average
Given a matrix, calculate the block average of each disjoint sub-matrix of the same size. Assume that the size of the matrix alo...

environ 10 ans il y a

A résolu


Block average ignoring NaN values
Given a matrix, calculate the block average of each disjoint sub-matrix while ignoring *NaN* values. Assume that the size of the...

environ 10 ans il y a

A résolu


RGB to CMYK
Convert an RGB code to the corresponding CMYK code for printing. The RGB input is a [1×3] double array between 0 and 1. ...

environ 10 ans il y a

A résolu


Crunch that matrix!
You are given an M x N matrix. Write a script that will compress this matrix into an M x (N/3) matrix, where each of the terms ...

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

environ 10 ans il y a

A résolu


Does this dress make me look fat
For the input string "Does xyz make me look fat" output the string "No, xyz does not make you look fat"

environ 10 ans il y a

Réponse apportée
change font size of subplot text
I use the following code, it can work clear;clc;close all subplot(335); fplot(@sin,[-1,1]); tx = text(.5,.5,'y = s...

environ 10 ans il y a | 0

A résolu


solid of revolution
Given an real polynomial P and two real numbers a,b with 0<=a<=b. Calculate the volume of the solid of revolution made by rota...

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

environ 10 ans il y a

Charger plus