문제를 풀었습니다


letter yes yes & letter no no
Split a string into two strings, first string has all alphabetic letters, next string has all the rest, keep the order please, o...

대략 14년 전

문제를 풀었습니다


Sort a list of complex numbers based on far they are from the origin.
Given a list of complex numbers z, return a list zSorted such that the numbers that are farthest from the origin (0+0i) appear f...

대략 14년 전

문제를 풀었습니다


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

대략 14년 전

문제를 풀었습니다


Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

대략 14년 전

문제를 풀었습니다


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

대략 14년 전

문제를 풀었습니다


Pascal's Triangle
Given an integer n >= 0, generate the length n+1 row vector representing the n-th row of <http://en.wikipedia.org/wiki/Pascals_t...

대략 14년 전

문제를 풀었습니다


Return a list sorted by number of consecutive occurrences
Inspired by Problem 38 by Cody Team. Given a vector x, return a vector y of the values in x sorted by the number of CONSECUTIVE...

대략 14년 전

답변 있음
fixing a problem with the date format
xlswrite('yournamefile.xlsx',cellstr(datestr(datevec(A,'mm/yy'),'mm/yyyy')))

대략 14년 전 | 0

답변 있음
Create a vector in Matlab
simple example: I = zeros(1,10) i1 = 5 i2=7 I(i1:i2) = .9

대략 14년 전 | 1

| 수락됨

답변 있음
sum a column depending on another column
out = sum(A(A(:,4)~=0,2))

대략 14년 전 | 1

| 수락됨

답변 있음
A question about a for loop
Data=xlsread('bootstrap.xls','blad1','A1:G4740'); mv_laag=[0.13 0.62 0.03 0 0.00 0 0.23]'; d = Data*mv_laag; out = re...

대략 14년 전 | 0

답변 있음
erasing specifi rows from a cell matrix
[~,b] = unique(A(:,1),'first') Aout=A(sort(b),:) or [c,c,c] = unique(A(:,1)); Aout=A(~([false;diff(c)==0]&~cellf...

대략 14년 전 | 0

답변 있음
identifying successive dates in a cell vector
[a,b,c] = unique(A); [jj,jj] = sort(b); out = accumarray(c,(1:numel(c))',[],@(x){x}); out = [a(jj),out(jj)]; ADD ...

대략 14년 전 | 0

| 수락됨

답변 있음
datestr not working properly
datestr(datenum(raw,'dd/mm/yyyy HH:MM:SS'), 'yyyy-mm-dd HH:MM:SS')

대략 14년 전 | 0

| 수락됨

답변 있음
Vector operatin in Matlab
Y= [0.1 0.3 0.4 0.8 0.3 0.5]; Y1 = [0.2323 0.25656 0.8]; out = [zeros(1,numel(Y1)-numel(Y)),Y].*[zeros(1,numel(Y)-numel(...

대략 14년 전 | 0

| 수락됨

답변 있음
Circular indexing of an array
in this case X = 1:10; conv(X([end,1:end]),[1 1]/2,'valid');

대략 14년 전 | 0

문제를 풀었습니다


Duplicates
Write a function that accepts a cell array of strings and returns another cell array of strings *with only the duplicates* retai...

대략 14년 전

문제를 풀었습니다


Remove the small words from a list of words.
Your job is to tidy up a list of words that appear in a string. The words are separated by one or more spaces. Remove all words ...

대략 14년 전

문제를 풀었습니다


Getting the indices from a matrice
Getting the indices from a matrice. Inspired by Problem 645. Getting the indices from a vector by the great Doug Hull. Given a...

대략 14년 전

문제를 풀었습니다


Getting the indices from a vector
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to <http://www.mathworks....

대략 14년 전

문제를 풀었습니다


Add more zeros
Find code that adds one 0 to each sequence of 0 in a string (composed with only 0 or 1). For example: '1010' -> '100100' ...

대략 14년 전

답변 있음
How can I pas a matrix to function handle which is going to be used in ode45 solver?
A = [a b c, d e f, g h i]; example = @(t,y)A*y; [X,Y]=ode45(example,xspan,ynot);

대략 14년 전 | 0

답변 있음
how to convert a matrix to a cell array
please read about functions <http://www.mathworks.com/help/techdoc/ref/num2cell.html |num2cell|> and <http://www.mathworks.com/h...

대략 14년 전 | 9

| 수락됨

답변 있음
how to get a integral vector result very fast with the upper limits which are supplied in an array?
try result = arrayfun(@(x)quad(tempFunction, 0, x),x);

대략 14년 전 | 0

| 수락됨

답변 있음
Finding the number of consecutive points in a given vector, using a condition
with function |regionprops| from |Image Processing Toolbox| idx = regionprops(A<1,'Area','PixelIdxList'); out = cell...

대략 14년 전 | 0

| 수락됨

문제를 풀었습니다


Replace all zeros and NaNs in a matrix with the string 'error'
Given a numeric input matrix A, possibly containing some zero values and some NaNs, replace any occurrences of zero or NaN with ...

대략 14년 전

답변 있음
Size of Images varying
m = size(A); A1 = zeros([m(1:2) + 2,m(3)]); A1(2:end-1,2:end-1,:) = A; Af = zeros(m); for ii = 1:m(1) for j...

대략 14년 전 | 1

| 수락됨

문제를 풀었습니다


Replicate elements in vectors
Replicate each element of a row vector (with NaN) a constant number of times. Examples : n=2, A=[1 2 3] -> [1 1 2 2 3 3] n=0...

대략 14년 전

답변 있음
data frequency conversion -cell matrix
n = cellfun(@(x)x/2,A(:,3:end),'un',0); Out = []; for ii = 1:size(A,1) if strcmp(A(ii,2),' ') Out = [O...

대략 14년 전 | 0

| 수락됨

답변 있음
advanced sorting of cell array of strings
k = regexp(files,'((?<=a_20_)\d*)|((?<=rpm_)\d*)','match'); [ii,ii] = sortrows(str2double(cat(1,k{:})),[-1 2]); files(ii...

대략 14년 전 | 1

더 보기