Resuelto


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;

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


ESEMPIO
controllo uso funzioni

casi 10 años hace

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

casi 10 años hace | 0

| aceptada

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

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

casi 10 años hace | 1

| aceptada

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

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

casi 10 años hace | 0

Problema


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

casi 10 años hace | 0 | 48 solvers

Respondida
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,:);

casi 10 años hace | 0

Resuelto


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

casi 10 años hace

Resuelto


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.

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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

casi 10 años hace

Resuelto


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.

casi 10 años hace

Cargar más