답변 있음
how to compare a string variable with a string?
Read about <http://www.mathworks.com/help/matlab/ref/strcmp.html |strcmp|>

대략 12년 전 | 0

| 수락됨

답변 있음
Convert cell-array to array-of-cells, for array-of-struct creation?
Fr = [{uint8([1;2;3])}, {uint32([4;5;6])},... {[7;8;9]}, {uint8([11,12;13,14;15,16])}]; To = cellfun(@(x)num2ce...

대략 12년 전 | 1

| 수락됨

답변 있음
Convert space separated string table to cell?
nn = size(Table,1); a = cellfun(@(x)regexp(x,'\w*','match'), num2cell(Table,2),'un',0); n = cellfun(@numel,a); mm = m...

대략 12년 전 | 1

답변 있음
How to make 2 data sets the same size
x1 = randi(500,6000,1); % your data x2 = randi(600,900,1); % Fx1 = griddedInterpolant(x1); Fx2 = griddedInterpol...

대략 12년 전 | 2

답변 있음
How to rearrange matrix and delet similar value ?
a=[ 0 0 10 150 150 0 125 150 0 10 125 150 0 0 80 0 0 70 80 5...

대략 12년 전 | 0

| 수락됨

답변 있음
How to generate a single vector of block-consecutive values from 2 vectors of same size without a loop ?
v = a(1):b(end); v = v(any(bsxfun(@ge,v,a.')&bsxfun(@le,v,b.'))); other variant zo = zeros(b(end) - a(1) + 2,1); ...

대략 12년 전 | 3

답변 있음
How can I create another matrix with the sum of every 30 rows in a 14,400 by 11 matrix?
out = squeeze(sum(reshape(yourdata',11,30,[]),2))';

대략 12년 전 | 5

| 수락됨

답변 있음
How to show output in multidimensional array?
udd2 = cat(3,udd{:});

대략 12년 전 | 0

| 수락됨

답변 있음
array multiplication with a negative value
t = A > 0; A(t) = -A(t); or A = -abs(A);

대략 12년 전 | 0

| 수락됨

답변 있음
How can I select a part of an array between NaN values
l = ~isnan(T(:,1)); k = [l(1);diff(l)] == 1; ii = cumsum(k); z = (1:size(T,1))'; outc = accumarray(ii(l),z(l),[],@...

대략 12년 전 | 1

| 수락됨

답변 있음
Nested for loop fourier series
To = 2*pi; s = numel(y); t = linspace(0,To,s).'; n = 1:10; ang = t*n; a0_1 = 1/To*trapz(t,y); abn_1 = 2/To*t...

대략 12년 전 | 0

답변 있음
find minimum value greater than zero in the rows
a(a == 0) = inf; b = min(a,[],2);

대략 12년 전 | 2

| 수락됨

답변 있음
how can I get the max of the values between NaN's in an array
l = ~isnan(T(:,1)); k = [l(1);diff(l)] == 1; ii = cumsum(k); z = (1:size(T,1))'; out = accumarray(ii(l),z(l),[],@(...

대략 12년 전 | 1

답변 있음
Why isn't the program run?
ff = @(x)[x(:),x(:).^3,repmat(2,numel(x),1)]; gf = @(x)[ones(numel(x),1),x(:),x(:).^2]; hf = @(x)[abs(x(:)),sin(x(:)),-a...

대략 12년 전 | 0

답변 있음
Trying to find cells of a matrix from vector values
V={[1; 3; 5;];[1; 3; 6;];[2; 3; 4; 5;]}; A =[1 5 3 4 3 1; 1 5 5 4 8 8; 5 2 4 6 3 10]; n = numel(V); out =zero...

대략 12년 전 | 0

답변 있음
find matching rows in matrices
C = intersect(A,B,'rows') index_A= find(ismember(A,C,'rows')); index_B= find(ismember(B,C,'rows'));

대략 12년 전 | 3

답변 있음
Help! How to find mutual numbers in 2 different vectors and replace them with the start and end not in common?
a = [2016 2059 43 2362 2450 88 2450 2474 25 2474 2684 36 3301 3332 31]; b = reshape(a(:,1:2),[],1); [b1,...

대략 12년 전 | 0

| 수락됨

답변 있음
how to find Intersection of strings
c2 = regexprep(c1,'D0',''); edit a1 = reshape(c1,2,[])'; a2 = reshape(c2,2,[])'; l = ismember(a1,a2,'rows'); ...

대략 12년 전 | 0

답변 있음
How do I keep MATLAB from truncating my date numbers?
time = datenum(time_string, 'mm/dd/yyyy HH:MM:SS AM');

대략 12년 전 | 0

답변 있음
creating grided matrix from lat lon and aod data
F = scatteredInterpolant(A(:,1:2),A(:,3),'natural'); m = min(A(:,1:2)); n = max(A(:,1:2)); [x,y] = ndgrid(m(1):.0272:...

대략 12년 전 | 0

답변 있음
How to call a different function for each iteration of a loop?
funcells = cell(15,1); for jj=1:15 Minsum=minimize6(D0,D1,D2,D3,D4,D5,D6,D7,D8,Data104trans(jj,3:13)); a = s...

대략 12년 전 | 0

| 수락됨

답변 있음
How can I process (plot, substract etc.) two vectors of different lengths?
ny1 = numel(y); ynew = interp1((1:ny1)',y,linspase(1,ny1,numel(x))'); plot(x,ynew);

대략 12년 전 | 0

답변 있음
Any idea to convert numerics to symbolic ?
x= 'a':'z'; z = '2*exp(3*x)+log10(4*x+9)+10'; dd = regexp(z,'(?<=[\(-*/+ ])\d*|\d*(?=[+*-/\)])','match'); out = regex...

대략 12년 전 | 0

답변 있음
i want to save all the value of variable a from all iterations into a single matrix ?
Lt = sqrt(abs(sum(bsxfun(@minus,f,reshape(b',size(f,1),1,[])))));

대략 12년 전 | 0

답변 있음
converting for loop to matrix operation
function [anom,cycle]=dhr(data) % daily_harmonic_regression d = data(:); n = numel(d); a = 2*pi*(1:n)'*(1:4...

대략 12년 전 | 0

| 수락됨

답변 있음
How to calculate a numerical approximate derivative vector of a function?
x= [0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 ] y= [5 6 7 7.5 7.5 7.5 6.5 2.5 -5 -6 -6] Yprimenum = diff(y)./diff(x); other v...

대략 12년 전 | 0

답변 있음
How can I get elegantly an upper triangle random matrix (0 elsewhere)?
triu(A,1)

대략 12년 전 | 1

| 수락됨

답변 있음
split data in a special manner
a=magic(18); bb=[1 3 6]; k = 3; i0 = zeros(size(a,1),1); i0(1:k:end) = 1; out = a(ismember(cumsum(i0),b...

대략 12년 전 | 0

답변 있음
Create a matrix from a row vector according to specifications
output = hankel(in(1:n-fuzzy_no),in(n-fuzzy_no:end-1))'; or output = in(bsxfun(@plus,1:n-fuzzy_no,(0:fuzzy_no-1)'));

대략 12년 전 | 0

| 수락됨

더 보기