Feeds
문제를 풀었습니다
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...
8년 초과 전
문제를 풀었습니다
Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...
8년 초과 전
문제를 풀었습니다
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 = ...
8년 초과 전
문제를 풀었습니다
Create a row array using double colon operator
Create a row array from 9 to 1, using the double colon operator.
8년 초과 전
문제를 풀었습니다
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...
8년 초과 전
문제를 풀었습니다
Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...
8년 초과 전
문제를 풀었습니다
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...
8년 초과 전
답변 있음
pixel by pixel squaring of image?
outImage = zeros(size(inputImage)); for i = 1 : size(inputImage, 1) for j = 1 : size(inputImage, 2) o...
pixel by pixel squaring of image?
outImage = zeros(size(inputImage)); for i = 1 : size(inputImage, 1) for j = 1 : size(inputImage, 2) o...
8년 초과 전 | 1
문제
Generate the sum of Squares of the given number
|P(n) = 1^2 + 2^2 + ... + n^2| |P(1) = 1| |P(2) = 1 + 4 = 5;| |P(3) = 5 + 9 = 14;| |P(4) = 14 + 16 = 30;|
대략 9년 전 | 0 | 솔버 수: 102
문제를 풀었습니다
Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...
대략 9년 전
문제를 풀었습니다
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.
대략 9년 전
문제를 풀었습니다
Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...
대략 9년 전
답변 있음
Combine two cell array of different dimension
Try this A = {1,2}; B = {3, 5, 6}; C = horzcat(A, B) ans = C = {1 2 3 5 6}
Combine two cell array of different dimension
Try this A = {1,2}; B = {3, 5, 6}; C = horzcat(A, B) ans = C = {1 2 3 5 6}
9년 초과 전 | 1
답변 있음
Launch a file with a popupmenu without Switch
If it is a script, Just include the file name " |ME_1| " in the editor window. Like this: str = str2double(get(handles.m...
Launch a file with a popupmenu without Switch
If it is a script, Just include the file name " |ME_1| " in the editor window. Like this: str = str2double(get(handles.m...
10년 초과 전 | 0
질문
Find the increasing and decreasing point in array?
I have an array. Which is increasing. At one point it starts decreases. This trend starts repeating many times in array. How ...
거의 11년 전 | 답변 수: 2 | 0
2
답변질문
How to smoothen the edges?
In the following Hand Image, How to smooth the edges in the indicated region? <</matlabcentral/answers/uploaded_files/8389/sa...
거의 11년 전 | 답변 수: 2 | 0
2
답변답변 있음
count the number of objects in the eight.tif.
Check this out I = imread('eight.tif'); imshow(I) level = graythresh(I); BW = im2bw(I,level); imshow(...
count the number of objects in the eight.tif.
Check this out I = imread('eight.tif'); imshow(I) level = graythresh(I); BW = im2bw(I,level); imshow(...
거의 11년 전 | 0
| 수락됨
답변 있음
face-recognition code in matlab
If you have MATLAB R2013a, Then you can find the face detector which comes inbuilt with MATLAB. % Create a cascade detector...
face-recognition code in matlab
If you have MATLAB R2013a, Then you can find the face detector which comes inbuilt with MATLAB. % Create a cascade detector...
거의 11년 전 | 1
질문
kmeans Segmentation Clarification for color images
I had segmented the attached image using kmeans. After kmeans color image segmentation, when I had plotted the cluster centers, ...
거의 11년 전 | 답변 수: 2 | 0
2
답변답변 있음
How to count the number of object present in binary image?
You can use |bwconncomp|. cc = bwconncomp(yourBinaryImage,4); number = cc.NumObjects;
How to count the number of object present in binary image?
You can use |bwconncomp|. cc = bwconncomp(yourBinaryImage,4); number = cc.NumObjects;
거의 11년 전 | 4
문제
Generate this matrix
Generate the following matrix. n = 2; out = [-4 -3 -2 -1 0 -3 -2 -1 0 1 -...
거의 11년 전 | 9 | 솔버 수: 629
문제를 풀었습니다
Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...
거의 11년 전
문제를 풀었습니다
Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.
거의 11년 전
문제를 풀었습니다
What's Your BMI?
Find the body mass index. For reference, please refer to Wikipedia here: <http://en.wikipedia.org/wiki/Body_mass_index body ...
거의 11년 전
문제를 풀었습니다
Circle area using pi
Given a circle's radius, compute the circle's area. Use the built-in mathematical constant pi.
거의 11년 전
문제를 풀었습니다
Rotate a Matrix by 90 degrees
Rotate a Matrix by 90 degrees Example: If the input is: X = 1 2 3 4 5 6 7 8 9 ...
거의 11년 전
문제를 풀었습니다
Determine Whether an array is empty
Input a matrix x, output y is TRUE if x is empty, otherwise FALSE.
거의 11년 전