Community Profile

photo

John Doe


86 2013 이후 총 참여 횟수

담당자

John Doe's 배지

  • Thankful Level 2
  • Revival Level 1
  • Knowledgeable Level 2
  • First Answer
  • Solver

세부 정보 보기...

참여 게시물
보기 기준

해결됨


Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Examp...

약 3년 전

해결됨


Is my wife right?
Regardless of input, output the string 'yes'.

약 3년 전

해결됨


Is my wife right? Now with even more wrong husband
Again, as in "Is my wife right?" ( <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right> ), answer 'yes' r...

약 3년 전

해결됨


Most nonzero elements in row
Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...

약 3년 전

해결됨


Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

약 3년 전

해결됨


Remove the vowels
Remove all the vowels in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill' Output s2 is 'Jck nd Jll wn...

약 3년 전

해결됨


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

약 3년 전

질문


Golf Recamán's sequence
Recamán's sequence described in pseudo-code is as follows: A(0) = 0 A(n) = A(n-1) - n if A(n-1) - n > 0 and is new, else...

약 5년 전 | 답변 수: 0 | 0

0

답변

질문


Can I find out in which release a function was introduced?
Sometimes I get error messages saying stuff like: Undefined function 'savefig' for input arguments of type 'char' or ...

5년 이상 전 | 답변 수: 2 | 1

2

답변

질문


x = 0:0.1:10... What's going on, really?
Please have a look at the following example: A = 0:0.1:0.4; find(A == 0.3) ans = Empty matrix: 1-by-0 fi...

5년 이상 전 | 답변 수: 2 | 1

2

답변

해결됨


Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

약 6년 전

해결됨


Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the other numbers. Otherwise return false. E...

약 6년 전

답변 있음
Finding integers between two vectors
A= [4.54 5.11 9.58 15.04]; B= [1.01 3.2 5.5 16.98]; C = sort([A; B]); C(1,:) = ceil(C(1,:)); C(2,:) = floor(C(...

약 6년 전 | 0

| 수락됨

질문


Using bsxfun for non-numeric data
Is there an equivalent to bsxfun for non-numeric data? For example, I want to compare all pairs of strings stored in two cell...

6년 이상 전 | 답변 수: 3 | 3

3

답변

질문


Find row number of elements
Hi, I have a list of branches, |BL|, and a list of nodes, |nodeList|. BL has two columns, containing to-from nodes for each b...

6년 이상 전 | 답변 수: 1 | 0

1

답변

답변 있음
join two matrices together
C = reshape([A; B],177,8) Good luck! - Rob

6년 이상 전 | 1

| 수락됨

답변 있음
what is the meaning of BW = ~ BW?
It gives you back the inverted binary matrix BW. That means, all 1's turns to 0's, and vice versa. In plain text: BW = not...

6년 이상 전 | 1

해결됨


Who Has the Most Change?
You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

6년 이상 전

해결됨


How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

6년 이상 전

해결됨


Remove any row in which a NaN appears
Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

6년 이상 전

해결됨


Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

6년 이상 전

해결됨


Summing digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

6년 이상 전

해결됨


Target sorting
Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...

6년 이상 전

해결됨


Find the numeric mean of the prime numbers in a matrix.
There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...

6년 이상 전

해결됨


radius of a spherical planet
you just measured its surface area, that is the input.

6년 이상 전

해결됨


Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

6년 이상 전

해결됨


Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

6년 이상 전

해결됨


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

6년 이상 전

해결됨


Back and Forth Rows
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...

6년 이상 전

답변 있음
multiplication table in matlab
Another one-liner: cumsum(meshgrid(1:10))

6년 이상 전 | 4

Load more