已解决


Basic commands - Least common multiple
Make a function which will return least common multiple of "a" and "b" Example: a=8; b=6; y=24;

8 years 前

已解决


Change string to number
Change given string to number. (hint: there is already function) Changing from ['1234'] to [1234] is one of example

8 years 前

已解决


Resort number using given index!
Resort matrix [a] using given index [b]. For example, if a=[2 5 3 5]; b=[4 1 2 3]; , the result is [5 2 5 3]. (hint: y...

8 years 前

已解决


Sort matrix a according to ascending order of B!
To be specific, A=[9 3 1 3] B=[1 3 2 4] are provided, ascending sorting of B is [B(1) B(3) B(2) B(4)]. Thus ...

8 years 前

已解决


Extract a part of matrix!
There is matrix A A=[1 2 3; 4 5 6; 7 8 9] Extract a part of matrix A from (2,2) to (3,3). Result should...

8 years 前

已解决


Calculate solution of given polynomial
For example, y=function([3 -2 -4]) In here, input vector indicate 3*x^2-2*x-4, y is solution of former equation. y=[1.5...

8 years 前

已解决


ESEMPIO
controllo uso funzioni

8 years 前

已回答
Fitting experimental data to find a function
You can try polyfit function or other curve fit function, i.e. nlinfit or lsqcurvefit,to find proper equation. you also use cft...

8 years 前 | 0

| 已接受

已解决


i forgot to use capital I
When referring to yourself you should write "I" (capital) and not "i". So correct the input string x, but be aware that other u...

8 years 前

已解决


Bubble sort
Write your own bubble sort function ( <https://en.wikipedia.org/wiki/Bubble_sort>) to sort all elements in x in ascending order....

8 years 前

已回答
Loop backwards and select subset of rows that meet criteria
if you want to use loop, it is showed below: tindex = find(A(:,1)==t); for j = tindex:-1:2 if(A(j,1)-A(j-1,1)==1)...

8 years 前 | 1

| 已接受

已解决


extract part elements of matrix into one new matrix
Given a matrix, includes different elements(plus, minus and zero), extract the nonzero elements and form a new matrix. for examp...

8 years 前

已解决


Find hen's weight.
If hen weights x kilos on two legs, how much does it weights on one leg? Output the result.

8 years 前

已解决


Avengers Assemble!
Given matrix with so many zeroes, trim those zeroes and output a matrix joining all nnz elements Example: input = [0 0 0 0 0...

8 years 前

已解决


Finding two missing number in 1 to n array
You are given an array of numbers from 1 to n with two missing numbers. Return the two missing numbers. Input: x=[5 2 0 1 ...

8 years 前

已回答
Replace rows with NaN only if there are more than two continous zero values in the same column
First, you can find the column with continous zeros(more than two), then find the index for replacement with nan. for example:...

8 years 前 | 0

问题


extract part elements of matrix into one new matrix
Given a matrix, includes different elements(plus, minus and zero), extract the nonzero elements and form a new matrix. for examp...

8 years 前 | 0 | 45 个解题者

已回答
Loop backwards and select subset of rows that meet criteria
you can solve it without loop, e.g B = find(diff(A(1:find(A(:,1)==t),1))~=1); result = A(B(end)+1:find(A(:,1)==t)-1,:);

8 years 前 | 0

已解决


Remove all the columns contains only zero
Remove the column from the matrix which has only zeros . Refer the Example below a= 1 0 3 0 23 0 56 0 1 ...

8 years 前

已解决


Calculate the hypotenuse of a right triangle without using ^ and sqrt ()
Find out the hypotenuse of right triangle. Say a = 4, b = 3 then c = 5 Please don't use ^ and sqrt() function.

8 years 前

已解决


Solve cosine without cos(x)
Solve cos(x). The use of the function cos() and sin() is not allowed.

8 years 前

已解决


Solve sin(x) without sin(x)
Calculate y = sin(x) x = 0 -> y= 0 without the use of sin(x) or cos(x)

8 years 前

已解决


Create vector as shown in test cases
Create vector as shown in test cases

8 years 前

已解决


Delete useless part of data
When someone deals with big data. if the person delete useless part, calculation will be more faster than before deleting. De...

8 years 前

已解决


Modified run-length companion vector
Given a vector x, return a vector that indicates the run length of any value in x. Each element in output vector shows how many ...

8 years 前

已解决


Find index of a string in a cell array
Write a function that finds the index at which the cell array of strings C contains the exact string S. So if C = {'twe...

8 years 前

已解决


Clipper Function
Create a function that emulates a clipper circuit Given sin wave, t and the constant value for clipping, and the direction to re...

8 years 前

已解决


Make equation that can express relationship!
Observed data [y] that vary with [x]. Unfortunately, [y] including small amount of errors. x=[1 2 3 4 5 6] y=[2.16 4.97 ...

8 years 前

已解决


Removing vibration!
There are [y] that vary with [x] but y including small useless vibration. x=1:10 y=[1.71 2.03 3.28 4.05 5.10 6.82 7.69 8.3...

8 years 前

已解决


Make 3d matrix from other matrix
A=[1 1;2 2]; B=[2 2;3 3]; C=[0 0;1 3]; Using given three matrix, make 3 dimensional matrix [D] by stacking.

8 years 前

加载更多