Risolto


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

circa 10 anni fa

Risolto


Unit conversion
Convert x degree Celsius to y degree Fahrenheit.

circa 10 anni fa

Risolto


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

circa 10 anni fa

Risolto


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

circa 10 anni fa

Risolto


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

circa 10 anni fa

Risolto


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

circa 10 anni fa

Risolto


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

circa 10 anni fa

Risolto


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

circa 10 anni fa

Risolto


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

circa 10 anni fa

Risolto


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

oltre 10 anni fa

Risolto


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

oltre 10 anni fa

Risolto


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

oltre 10 anni fa

Risolto


Wien's displacement law
Given the black body temperature (in *Celsius*), output the weavelength (in *meters*) at which the radiation peaks, according to...

oltre 10 anni fa

Risolto


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

oltre 10 anni fa

Risolto


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

oltre 10 anni fa

Risolto


Transpose of matrix
Transpose of matrix as per test cases

oltre 10 anni fa

Risolto


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;...

oltre 10 anni fa

Risolto


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

oltre 10 anni fa

Risolto


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

oltre 10 anni fa

Risolto


Values in Array
How many values are in the array

oltre 10 anni fa

Risolto


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

oltre 10 anni fa

Risolto


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

oltre 10 anni fa

Risolto


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

oltre 10 anni fa

Risolto


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

oltre 10 anni fa

Risolto


Isothermal Expansion
Given the initial pressure and volume of an ideal gas, calculate the new volume, given the new pressure. Hint: <https://en.wi...

oltre 10 anni fa

Risolto


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"

oltre 10 anni fa

Risposto
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...

oltre 10 anni fa | 0

Risolto


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

oltre 10 anni fa

Risolto


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

oltre 10 anni fa

Carica altro