답변 있음
How can I make a smaller matrices from a bigger matrix?
A = B(C,C);

13년 초과 전 | 0

| 수락됨

답변 있음
store vectors in matrix over for loop
x1s=(1:3)'; x2s=(10:10:30)'; [ii jj]=ndgrid(x1s,x2s); overnested = arrayfun(@(x,y)[x y],ii,jj,'un',0); or ...

13년 초과 전 | 0

| 수락됨

답변 있음
regriding an irregular matrix
If you have data as text file - |yourdata.txt| (eg): 2Jan2002 40 65 6Jan2002 45 22 8Jan2002 43 45 8Jan2002 49 ...

13년 초과 전 | 0

| 수락됨

답변 있음
Eliminate rows of cell array outside of a range
final2{1} = final2{1}(final2{1}(:,1)>-7 & final2{1}(:,1)<-6 ,:)

13년 초과 전 | 0

답변 있음
Merging columns within a single matrix
A(:,[1;3])

13년 초과 전 | 0

| 수락됨

답변 있음
i've a matrix of 6x4 and i want to count the rows how many times it occur in a matrix
A=[ 12 45 67 89 34 56 78 65 12 45 67 89 53 55 21 90 12 45 67 89 53 55 21 90 ]; ...

13년 초과 전 | 3

답변 있음
How to find compare unequal size matrices and create new matrix by combining them??
ii = ismember(Y(:,1:4),X(:,1:4),'rows'); M = [Y(:,1:4),nan(size(Y,1),3)]; M(ii,5:end) = X(:,5:end);

13년 초과 전 | 1

| 수락됨

답변 있음
Averaging every n step column and m step row
Z = randi([14 66],108,8); % eg mns = ndgrid(1:12,2004:2012); [ln,ln] = ndgrid(1:numel(mns),1:8); Zout=accumarray(...

13년 초과 전 | 1

답변 있음
How can I find the indices of the 3 largest values in my matrix?
A = [99 45 93 64; 12 83 24 85 39 71 29 13]; [ii,ii] = sort(A(:),'descend'); out = ii(1:3);

13년 초과 전 | 0

| 수락됨

답변 있음
Integration of piecewise function with integral
function J = R(f,x,m) t = x >= 20; p = zeros(numel(x),1); p(t) = x(t) - 20; J = arrayfun(@(x,y)integral(@(t)f(t,m)...

13년 초과 전 | 0

답변 있음
Find a range of minimum values in a vector/array
I see two ways: 1) out = sort(yourarray); out = out(1:3); 2) [ii,ii] = min(conv(yourarray,[1 1 1],'same')); ...

13년 초과 전 | 0

| 수락됨

답변 있음
How to obtain the filtered Index of Cell Array
AllNames= {'A.1';'A.1';'A.10';'A.10';'A.10';'A.10';'A.15';'A.15';'A.16' ;'A.17';'A.17';'A.17';'A.17';'A.17';'A.20A' ;'A.20A';'...

13년 초과 전 | 0

답변 있음
combine variables into a multi column text file
use cell arrays: row = [ 125 421]; col =[ 651 876]; name = { 'point_1' 'point_2'}...

13년 초과 전 | 0

답변 있음
How to read cell range from one cell in file
raw(2,3) = {3:4, 6:10};

13년 초과 전 | 0

문제를 풀었습니다


Generate binary combinations for a given number of bit(s)
Generate the binary combination as in the example below. Example: If you are given: bin_comb(2) The answer will be: ...

13년 초과 전

문제를 풀었습니다


Remove entire row and column in the matrix containing the input values
Remove the entire row and column from the matrix containing specific values. The specified value can be a scalar or a vector. Fo...

13년 초과 전

답변 있음
Take mininum over only two dimensions of 4-d array
a = randi(10,4,5,2,3); % eg s = size(a); a1 = reshape(a,s(1),s(2),[]); [m1,i1] = min(a1,[],3); k = mod(i1-1,s(...

13년 초과 전 | 0

답변 있음
function that gives the number of letters in a word
length(w{1}) ; out = cellfun('length',w);

13년 초과 전 | 2

답변 있음
how to find the index of first n occurrence of each unique value of a matrix
A = randi(8,20,1); % eg n = 4; A1 = unique(A) na = numel(A1); out = [A1(:).';nan(n,na)]; for j1 = 1:na ...

13년 초과 전 | 0

답변 있음
Repeat each page of 3d matrix 24 times
out = totmelt( :,:,kron(1:size(totmelt,2), ones(1,24)) );

13년 초과 전 | 1

답변 있음
How do I exclude zeros from a matrix?
s = size(A); A1 = zeros(s); for j1 = 1:s(1) A1(j1,1:nnz(A(j1,:))) = nonzeros(A(j1,:)); end other variant: ...

13년 초과 전 | 0

| 수락됨

답변 있음
Find a vector of string in a Cell array
[~,i1] = ismember(Dataset,uniquevalue); index = find(all(diff(i1,1,2)==1,2)); other variant: Dataset = { 'DICL' ...

13년 초과 전 | 1

| 수락됨

답변 있음
Loop for nested matrix multiplication
eg: A = randi(4,155,3); B = randi(8,455,3);% your matrices A and B one variant; s = size(A); C = zeros(s); ...

13년 초과 전 | 0

| 수락됨

답변 있음
How can I solve this question
syms x out = prod(x - solve(x^3-3*x^2+x+5))

13년 초과 전 | 0

답변 있음
Selecting the most repeated value
out = b((max(a) == a));

13년 초과 전 | 0

답변 있음
Using a Nested For Loop with input from an Array to Create an Array
ii = (1:100)'; mancof = sf/E*(2*ii).^b + ef*(2*ii).^c - t; Fatigue_Life = find(mancof > 0); ADD after Luke's comment ...

13년 초과 전 | 0

| 수락됨

답변 있음
Can someone help me with symbolic differentiation?
TempVar2 = jacobian(Phi,Var);

13년 초과 전 | 0

답변 있음
The elements of a mxn matrix are the results of m*n matrices. how to do it?
w = cell(6); for i1 = 1:6 for j1 = 1:6 w{i1,j1} = eval(sprintf('matrix_%d%d',i1,j1)); end end

13년 초과 전 | 1

| 수락됨

답변 있음
Inverse of a covariance matrix (loop)
Try this is code: d = [19261103; 20121231]; ddte = datenum(num2str(d),'yyyymmdd'); ndte = (ddte(1):ddte(2))'; t ...

13년 초과 전 | 0

| 수락됨

답변 있음
how to convert numstrng to integers and take lcm
Try this: out2 = [ 1 0 0 1 0 1 1 1 1 1 0 1 1 1 0 1...

13년 초과 전 | 0

| 수락됨

더 보기