문제를 풀었습니다


Wind Chill Computation
On a windy day, a temperature of 15 degrees may feel colder, perhaps 7 degrees. The formula below calculates the "wind chill," i...

11년 초과 전

문제를 풀었습니다


Multiply Column
Given two input, one matrix and one scalar number For example A is a matrix given A = [ 1 2 2 5 2 5 2 3 4 6...

11년 초과 전

문제를 풀었습니다


Count number of words in string
Count number of words in string E.g. 'hi', answer is 1 'hi hi', answer is 2 'I enjoy cody', answer is 3

11년 초과 전

문제를 풀었습니다


Stuff the Board
You have a stack of tiles to put onto an array-like playing board. Each tile has a number (always an integer), and the board var...

11년 초과 전

문제를 풀었습니다


Scoring for oriented dominoes
Given a list of ordered pairs, and the order they should be placed in a line, find the sum of the absolute values of the differe...

11년 초과 전

문제를 풀었습니다


Beginner's Problem - Squaring
Try out this test problem first. Given the variable x as your input, square it by two and put the result in y. Examples: ...

11년 초과 전

문제를 풀었습니다


Max of a Vector
Write a function to return the max of a vector

11년 초과 전

답변 있음
how to arrange multiple xlsx files in year to seasonal
[n,tt] = xlsread('input.xlsx'); m = size(n,1); [ii,~] = ndgrid(1:12,zeros(m,1)); j1 = find(ii == 11,1,'first'); ...

11년 초과 전 | 1

| 수락됨

답변 있음
How to do it more efficiently?
[l0,ii] = ismember(time_synced,cCells(:,1)); out = nan(numel(time_synced),size(cCells,2)); out(l0,:) = cCells(ii(l0)...

11년 초과 전 | 0

답변 있음
change size of matrix without changing number of row and column
B = [0 6 7;6 1 0;7 0 1]; C = [0 1 3 5:7;2 0 0 1 0 0; 3 1 0 0 1 0; 8 0 1 0 0 1; 9 0 0 0 0 1]; E = [0 3:7; 8 0 0 1 0 0;9 1...

11년 초과 전 | 0

| 수락됨

답변 있음
Unequal partitioning a vector
out = mat2cell(x,1,[3 4 5])

11년 초과 전 | 1

| 수락됨

답변 있음
integrate 3 matrix into one matrix
A = [e,[q(2:end);w]]; OR A = hankel(q); A(2:end,2:end) = 0;

11년 초과 전 | 0

| 수락됨

답변 있음
How to convert string to matrix
A='55 3@ 4 5@ 47 89@ 33 12@' out = reshape(str2double(regexp(A,'\d*','match')),2,[])'

11년 초과 전 | 3

답변 있음
Change string of text into multiple lines
s = ',1,1880802442166,1,751702411341,1,751702411358,1,751702411365,1,751702411372,1,751702411389,1,751702459060,1,751702459077...

11년 초과 전 | 1

답변 있음
Fastest & most effective way to create this matrix:
one way a =[1 2 3 4 5 6 7 8 9]; out = kron([0 0 ; 0 1],a);

11년 초과 전 | 1

| 수락됨

답변 있음
Counting the number of elements that match between a vector and a matrix
nnz(ismember(K,vec))

11년 초과 전 | 1

| 수락됨

문제를 풀었습니다


Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

11년 초과 전

문제를 풀었습니다


Concatenate two strings
Its very easy. Just concatenate two strings.

11년 초과 전

문제를 풀었습니다


Palindrome Check
Check whether the entire matrix is palindrome or not. Example matrix = [7 8 7] matrix_reverse = [7 8 7] So the mat...

11년 초과 전

문제를 풀었습니다


Reverse a matrix
Its simple. You have to reverse a given matrix.

11년 초과 전

문제를 풀었습니다


Find the area of the four walls
If length, breadth and height of the walls are given, find the area of the four walls.

11년 초과 전

문제를 풀었습니다


チェッカーボードを作ろう
整数 n が与えられた時、以下の様な1と0を含むn×nの行列を作成しましょう。a(1,1) は1にする必要があります。 例: 入力 n = 5 出力 a が [1 0 1 0 1 0 1 0 1 0 ...

11년 초과 전

문제를 풀었습니다


Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<http://upload....

11년 초과 전

문제를 풀었습니다


Area of an equilateral triangle
Calculate the area of an equilateral triangle of side x. <<http://upload.wikimedia.org/wikipedia/commons/e/e0/Equilateral-tr...

11년 초과 전

문제를 풀었습니다


Side of an equilateral triangle
If an equilateral triangle has area A, then what is the length of each of its sides, x? <<http://upload.wikimedia.org/wikipe...

11년 초과 전

문제를 풀었습니다


Side of a rhombus
If a rhombus has diagonals of length x and x+1, then what is the length of its side, y? <<http://upload.wikimedia.org/wikipe...

11년 초과 전

문제를 풀었습니다


Triangle sequence
A sequence of triangles is constructed in the following way: 1) the first triangle is Pythagoras' 3-4-5 triangle 2) the s...

11년 초과 전

답변 있음
How to sort file when reading them with dir ?
n = dir('doc_*.txt'); n1 = {n.name}; z = regexp(n1,'(?<=doc_)\d*(?=\.txt)','match'); z1 = str2double(cat(1,z{:})); ...

11년 초과 전 | 1

답변 있음
How to index a sorted array with the actual array?
a = rand(20,1); [new,idx] = sort(a);

11년 초과 전 | 0

| 수락됨

더 보기