문제를 풀었습니다


Calculate roots of polynomial given as vector array.
Calculate roots of polynomial given as vector array. Example x=[1 2 0 5 0 3] result=[-2.7267 ; ...

거의 10년 전

문제를 풀었습니다


Find scalar product of two polynomials a and b, given as vector array.
Find scalar product of two polynomials given as vector array. Example a=[1 -1 2]; b=[2 4 1]; result=0

거의 10년 전

문제를 풀었습니다


Return amount of palindromes in the string.
Example Input: s='eye story pop dictionary noon enjoy software moon' Output: amount=3

거의 10년 전

문제를 풀었습니다


Counting candies
In a classroom of |'n'| children, every even numbered child gets one big candy and every odd numbered child gets two small candi...

거의 10년 전

문제를 풀었습니다


Find Euclidean norm of given vector u.
Find Euclidean norm of given vector u. https://en.wikipedia.org/wiki/Euclidean_distance Example x=[1 1] result=sqrt(1^2+1^2...

거의 10년 전

문제를 풀었습니다


Find cosine between two given vectors u and v.
Find cosine between two given vectors u and v. Example u = [5 2 0 5 3 0]; v = [3 2 5 1 ...

거의 10년 전

문제를 풀었습니다


Numerate input arguments
For every input, output the number. Example: [a, b] = Test('first', 'second') a=1; b=2;

거의 10년 전

문제를 풀었습니다


Calculate the eigenvalues of A.
Calculate the sum of the eigenvalues of A. If it's odd return cubed else return 54.

거의 10년 전

문제를 풀었습니다


Find product of eigenvalues of n*n magic matrix.
Find product of eigenvalues of n*n magic matrix. Example n=3 Matrix= [ 8 1 6; 3 5 7; 4 ...

거의 10년 전

문제를 풀었습니다


Find the product of the positive elements above the main diagonal.
Example Input A=[1 2; -3 0] Output 2

거의 10년 전

문제를 풀었습니다


Calculate the sum of elements of n*n Hilbert matrix.
Calculate the sum of elements of n*n Hilbert matrix. Example n=5 HilbertMatrix=[1.0000 0.5000 0.3333 0.2500 ...

거의 10년 전

문제를 풀었습니다


For given vectors x,y find coresponding spline coefficients.
For given vectors x,y find coresponding spline coefficients. Example x =[ -3 -2 0 2 3] y =[ 0 0 1 ...

거의 10년 전

문제를 풀었습니다


Get linearly independent vectors of given matrix.
Get linearly independent vectors of given matrix. Example matrix=[ 3 -1 0 0 ; 0 3 0 0...

거의 10년 전

문제를 풀었습니다


Calculate the centroid of a triangle
Info: https://en.wikipedia.org/wiki/Centroid Example Input: x = [0 0 1]; % x-coordinate y = [0 1 0]; % y-coordinat...

거의 10년 전

문제를 풀었습니다


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

거의 10년 전

문제를 풀었습니다


What's size of TV?
Many people buy TV. Usually they ask about diagonal. But also important are width and height. Let's assume that all TV have rati...

거의 10년 전

문제를 풀었습니다


isnan()
Replace all nans with zeros

거의 10년 전

답변 있음
How do I generate a random number between two numbers, "n" number of times?
Without using a for-loop: a = 0; b = 255; n = 1000; x = a + (b-a).*rand(n,1); will generate n numbers randomly ...

거의 10년 전 | 1

답변 있음
Plotting the data if all the data point is to be represented by a vertical bar from the x-axis (y=0) to the value of y for that point
y = randi(10,1,10); % generate random data figure; hold on; for ii=1:length(y) plot([ii ii],[0 y(ii)],'b'); e...

거의 10년 전 | 1

| 수락됨

답변 있음
Help converting cell to matrix of doubles (Large matrix)
I think datevec is what you want. d = datevec(data(:,1),'yyyy-mm-dd'); d = d(:,1:3); % if you only want to keep the year...

거의 10년 전 | 0

| 수락됨

답변 있음
How do seperate a string in different strings while not creating new strings for variables
For diversity of answers, here is another option (although I do not claim it is better than other answers!): str = '# Donal...

거의 10년 전 | 2

| 수락됨

답변 있음
Is there a way to reduce the precision of Matlab overall?
Here is a simple way to change the precision of a result: n = 4; % number of desired decimal points x = round(x*10^n)/10...

거의 10년 전 | 1

답변 있음
Matlab delete's value's from array
Suppose you have an M-by-N matrix (A) of NaNs, 0s, and 1s: M = 3648; % number of rows N = 4; % number of columns A ...

거의 10년 전 | 0

답변 있음
check if url exists for large files without downloading the file
It seems I stumbled upon a similar approach to Steven, but a few minutes too late! I think this function would do the trick: ...

거의 10년 전 | 0

답변 있음
a matlab code of getting a value uniformly at random from a the set {-1,1}
To generate values uniformly from the set {-1,1}, use: N = 100; x = 2*(rand(N,1)>0.5)-1; where N is the number of val...

거의 10년 전 | 2

문제를 풀었습니다


calculate the day of the year from a date string.
'09-Oct-2016' is the 283rd day of the year. So doy = dayoftheyear('09-Oct-2016') should return doy = 283

거의 10년 전

문제를 풀었습니다


Implement zero-based indexing for Matrices
Given an input vector and position (which is zero based) output the value Example: x = [1 2; 4 5] pos = [0 1] value = 5 ...

거의 10년 전

문제를 풀었습니다


Triplicate me
Given an input vector, output a 3n vector with all elements of input vector repeated thrice Example : in->[1 2 3 5] out...

거의 10년 전

문제를 풀었습니다


Calculate correlation.
There are two data. y1=[0 1 2 3 4]' y2=[2 3 4 5 6]' We can see positive relationship between y1 and y2. The relations...

거의 10년 전

더 보기