已解决


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

10 years 前

已解决


Unit conversion
Convert x degree Celsius to y degree Fahrenheit.

10 years 前

已解决


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

10 years 前

已解决


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

10 years 前

已解决


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

10 years 前

已解决


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

10 years 前

已解决


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

10 years 前

已解决


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

10 years 前

已解决


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

10 years 前

已解决


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

10 years 前

已解决


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

10 years 前

已解决


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

10 years 前

已解决


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

10 years 前

已解决


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

10 years 前

已解决


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

10 years 前

已解决


Transpose of matrix
Transpose of matrix as per test cases

10 years 前

已解决


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

10 years 前

已解决


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

10 years 前

已解决


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

10 years 前

已解决


Values in Array
How many values are in the array

10 years 前

已解决


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

10 years 前

已解决


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

10 years 前

已解决


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

10 years 前

已解决


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

10 years 前

已解决


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

10 years 前

已解决


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"

10 years 前

已回答
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...

10 years 前 | 0

已解决


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

10 years 前

已解决


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

10 years 前

加载更多