Solved


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 years ago

Solved


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 years ago

Solved


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 years ago

Solved


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 years ago

Solved


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 years ago

Solved


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 years ago

Solved


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

11 years ago

Answered
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 years ago | 1

| accepted

Answered
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 years ago | 0

Answered
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 years ago | 0

| accepted

Answered
Unequal partitioning a vector
out = mat2cell(x,1,[3 4 5])

11 years ago | 1

| accepted

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

11 years ago | 0

| accepted

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

11 years ago | 3

Answered
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 years ago | 1

Answered
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 years ago | 1

| accepted

Answered
Counting the number of elements that match between a vector and a matrix
nnz(ismember(K,vec))

11 years ago | 1

| accepted

Solved


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 years ago

Solved


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

11 years ago

Solved


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 years ago

Solved


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

11 years ago

Solved


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 years ago

Solved


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

11 years ago

Solved


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 years ago

Solved


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 years ago

Solved


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 years ago

Solved


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 years ago

Solved


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 years ago

Answered
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 years ago | 1

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

11 years ago | 0

| accepted

Load more