A résolu


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;

presque 10 ans il y a

A résolu


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

presque 10 ans il y a

A résolu


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

presque 10 ans il y a

A résolu


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

presque 10 ans il y a

A résolu


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

presque 10 ans il y a

A résolu


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

presque 10 ans il y a

A résolu


ESEMPIO
controllo uso funzioni

presque 10 ans il y a

Réponse apportée
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...

presque 10 ans il y a | 0

| A accepté

A résolu


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

presque 10 ans il y a

A résolu


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

presque 10 ans il y a

Réponse apportée
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)...

presque 10 ans il y a | 1

| A accepté

A résolu


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

presque 10 ans il y a

A résolu


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

presque 10 ans il y a

A résolu


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

presque 10 ans il y a

A résolu


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

presque 10 ans il y a

Réponse apportée
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:...

presque 10 ans il y a | 0

Problème


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

presque 10 ans il y a | 0 | 48 solveurs

Réponse apportée
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,:);

presque 10 ans il y a | 0

A résolu


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

presque 10 ans il y a

A résolu


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.

presque 10 ans il y a

A résolu


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

presque 10 ans il y a

A résolu


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

presque 10 ans il y a

A résolu


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

presque 10 ans il y a

A résolu


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

presque 10 ans il y a

A résolu


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

presque 10 ans il y a

A résolu


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

presque 10 ans il y a

A résolu


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

presque 10 ans il y a

A résolu


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

presque 10 ans il y a

A résolu


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

presque 10 ans il y a

A résolu


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.

presque 10 ans il y a

Charger plus