답변 있음
How to convert text file full of numbers to a binary image?
f = fopen('yourtxtfile.txt'); c = textscan(f,'%s','EndOfLine','\n'); fclose(f); k = min(cellfun(@numel,c{:})); ...

11년 초과 전 | 2

| 수락됨

답변 있음
How to delete an repeated values in matrix?
x = [197.9040 11.6502 41.6502 41.3856 41.3856 0 197.9040 12.2180 51.2008 61.2008 104.31...

11년 초과 전 | 0

답변 있음
how to get following matrix using bsxfun
k = 0:72/8; M = repmat(x,numel(k),1); add = 8*ones(size(x,1),1)*k; M(:,3) = add(:); with |bsxfun| m = reshape...

11년 초과 전 | 1

답변 있음
Why am I getting the error : Operands to the || and && operators must be convertible to logical scalar values for the below code?
X = [0 2 5 20 40]'; xq = 40*rand(20,1); xq(3)= 1.3; xq(5) = 5; Y = [2 5 8 40 60]'; function yq = myInterp(...

11년 초과 전 | 1

| 수락됨

답변 있음
extracting smaller matrices from a larger matrix through loop
out = zeros(10,2,100/10); for ii = 1:size(out,3) out(:,:,ii) = M(k(ii)-9:k(ii),:); end

11년 초과 전 | 0

답변 있음
Find whether a vector occurs exactly in another vector
other variant n = numel(y); pos = find(all(bsxfun(@eq,y(:),hankel(x(1:n),x(n:end)))));

11년 초과 전 | 1

답변 있음
How can I write all month's last dates for a given period of time?
BigMatrix = cellstr(datestr(b+(1:a)'));

11년 초과 전 | 0

답변 있음
Arrange Matrix - Same Values of a Row to one Column
sourceData = {1 'ABC1';3 'ABC2'; 8 'ABC1'; 7 'ABC3'; 0 'ABC1'; ... 5 'ABC3'; 8 'ABC2'; 4 'ABC3'; 7 'ABC2'; 6 ...

11년 초과 전 | 0

문제를 풀었습니다


Change Vector Value
Change the element of the vector with respect to the element of the direction vector If the element of the direction vecto...

11년 초과 전

답변 있음
Random zero-restrictions in vector
B1 = B; ii = B~=0; C = B(ii); D = accumarray(C(:),(1:numel(C))',[],@(x){ x(randperm(numel(x))) }); x = cellfun(@(x...

11년 초과 전 | 0

답변 있음
Reshape a 2D matrix to a 3D matrix
reshape(yourarray,size(yourarray,1),1,[]); other way permute(yourarray,[1 3 2]);

11년 초과 전 | 1

답변 있음
average of each 10 values of an external file and save in new file
oldcontent = readtable('example11.xls'); data = table2array(oldcontent); [a,~,c] = unique(data(:,1)); [ii,jj] = n...

11년 초과 전 | 0

문제를 풀었습니다


Add 7
Given an input variable x, output a variable y that is 7 greater than x. Example: Input x = 1 Output y is 8 Input ...

11년 초과 전

문제를 풀었습니다


arithmetic progression
I've written a program to generate the first few terms of <https://en.wikipedia.org/wiki/Arithmetic_progression arithmetic progr...

11년 초과 전

문제를 풀었습니다


Determinant without using det()
Given a square matrix A, compute the <http://en.wikipedia.org/wiki/Determinant determinant> of A. Note that you may not use t...

11년 초과 전

문제를 풀었습니다


Positive Infinity
Round the array a towards positive infinity

11년 초과 전

문제를 풀었습니다


Sort (high on middle, low on ends)
Sort the vector of numbers in order low-high-low. Even numbers appear in ascending order on the left and odd numbers appear in d...

11년 초과 전

문제를 풀었습니다


Radiation Heat Transfer — View Factors (3)
View factors (aka configuration factors) are utilized in some radiation heat transfer models to estimate heat transfer rates bet...

11년 초과 전

문제를 풀었습니다


Radiation Heat Transfer — View Factors (2)
View factors (aka configuration factors) are utilized in some radiation heat transfer models to estimate heat transfer rates bet...

11년 초과 전

문제를 풀었습니다


Replace May with April
For instance, if the input is input_str = 'The flowers may bloom in April'; then the output is output_str = 'The flo...

11년 초과 전

문제를 풀었습니다


Sum the 'edge' values of a matrix
Sum the 'edge' values of an input matrix (the values along the perimeter). Example [1 2 3 4 5 6 7 8 9] Output = ...

11년 초과 전

문제를 풀었습니다


geometric progression
I've modified my <http://uk.mathworks.com/matlabcentral/cody/problems/2800-arithmetic-progression previous program> so that it n...

11년 초과 전

문제를 풀었습니다


Radiation Heat Transfer — View Factors (1)
View factors (aka configuration factors) are utilized in some radiation heat transfer models to estimate heat transfer rates bet...

11년 초과 전

문제를 풀었습니다


Split up vector or matrix delimited by NaNs
Given several vectors contained within one vector delimited by NaNs, return each individual vector as an element of a cell vecto...

11년 초과 전

문제를 풀었습니다


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 = ...

11년 초과 전

문제를 풀었습니다


Number of 1s in a binary string
Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...

11년 초과 전

문제를 풀었습니다


Solve Linear equations
Solve Linear equations Example: x+y=2 and x+2y=3, then x and y equal to 1.

11년 초과 전

문제를 풀었습니다


length of string on cylinder
A cylinder H cm high has a circumference of C cm. A string makes exactly N complete turns round the cylinder while its two ends ...

11년 초과 전

문제를 풀었습니다


Rotate a Matrix
Input a Matrix x, Output y is the matrix rotating x 90 degrees clockwise

11년 초과 전

문제를 풀었습니다


Find the largest value in the 3D matrix
Given a 3D matrix, A, find the largest value. E.g. >> A = 1:9; >> A=reshape(A,[3 1 3]); >> islargest(A) ans = 9

11년 초과 전

더 보기