문제를 풀었습니다


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;

9년 초과 전

문제를 풀었습니다


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

9년 초과 전

문제를 풀었습니다


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

9년 초과 전

문제를 풀었습니다


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

9년 초과 전

문제를 풀었습니다


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

9년 초과 전

문제를 풀었습니다


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

9년 초과 전

문제를 풀었습니다


ESEMPIO
controllo uso funzioni

9년 초과 전

답변 있음
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...

9년 초과 전 | 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...

9년 초과 전

문제를 풀었습니다


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

9년 초과 전

답변 있음
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)...

9년 초과 전 | 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...

9년 초과 전

문제를 풀었습니다


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

9년 초과 전

문제를 풀었습니다


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

9년 초과 전

문제를 풀었습니다


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

9년 초과 전

답변 있음
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:...

9년 초과 전 | 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...

9년 초과 전 | 0 | 솔버 수: 46

답변 있음
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,:);

9년 초과 전 | 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 ...

9년 초과 전

문제를 풀었습니다


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.

9년 초과 전

문제를 풀었습니다


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

9년 초과 전

문제를 풀었습니다


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

9년 초과 전

문제를 풀었습니다


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

9년 초과 전

문제를 풀었습니다


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

9년 초과 전

문제를 풀었습니다


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

9년 초과 전

문제를 풀었습니다


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

9년 초과 전

문제를 풀었습니다


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

9년 초과 전

문제를 풀었습니다


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

9년 초과 전

문제를 풀었습니다


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

9년 초과 전

문제를 풀었습니다


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.

9년 초과 전

더 보기