Answered
How do I fit an exponential curve to my data?
[EDIT] Please read about fit and try: x=[1,2,4,6,8]'; y=[100,140,160,170,175].'; g = fittype('a-b*exp(-c*x)'); f0 = fit(x,...

12 years ago | 7

| accepted

Answered
position of the element have small value
[~,ii] = min(A); position_pq = [1:size(A,2);ii];

12 years ago | 0

| accepted

Answered
How to organise data based on a large range of numbers?
ssn = {'summer','autumn','winter','spring'}; d = [31 28 31 30 31 30 31 31 30 31 30 31]; dd = cumsum(d'); b = [1;dd(cu...

12 years ago | 0

Answered
Find local differences in a matrix
D = diff(cmap,1,2);

12 years ago | 0

| accepted

Answered
Assign values to elements of a matrix with indices less than those specified in an array
n = max(A); nn = numel(A); p = zeros(n,nn); p(A + n*(0:nn-1))=1; out = flipud(cumsum(flipud(p)));

12 years ago | 0

Answered
how rearrange data in a matrix?
a = num2cell(reshape(data,1,2,[]),[1 2]) out = blkdiag(a{:}); or out = kron(eye(4),[1 1])*diag(data); or ou...

12 years ago | 1

Answered
how do i sort cell array
q = {'T1-001','T2-058','T1-235','T1-058','T2-001',' T1-045'}; q0 = regexp(q,'\d*','match'); q1 = str2double(cat(1,q0...

12 years ago | 1

Answered
cell2mat returns an error
Just: str2double(A)

12 years ago | 0

Answered
How do i manipulate matrix in form given below??
reshape(a',size(a))';

12 years ago | 0

Answered
Using .data{1,i} in a for loop
for ii = 1:5, Work{ii}=Constant.*Test{1,ii}.data.*Increment; end

12 years ago | 0

Answered
sorting data in matrix
asorted = sortrows(a,[-2 1])

12 years ago | 0

| accepted

Answered
how to find the location of element in matrix?
I=[2 3 10 4 6; 1 4 7 5 3; 5 2 8 4 3;8 2 1 7 3;1 9 8 3 4;]; D = padarray(I,[1 1],0,'both'); s = size(I); N = padarray(...

12 years ago | 0

| accepted

Answered
Looping matrix differences for every iterations
d = bsxfun(@minus,A(:)',W(:));

12 years ago | 0

| accepted

Answered
How to convert a 80x60 cell of 8x8 block matrices into a matrix array of 640x480?
DQ_Ymat = cell2mat(C_Y); Please read about function |cell2mat|: doc cell2mat

12 years ago | 1

| accepted

Answered
how to convert 1D element into 2D element in a matirx?
A = [4 0 3 0 4 4 4 -3 -3 -3 2 -3 5 0 -1 5] s = size(A); [irow,icol] = ndgrid(1:...

12 years ago | 0

Answered
how to swap this matrix
[v,ia] = min(A); A(ia) = Z(1); Z(1) = v; ADD [~,ia] = min(A); Z([ia,1]) = Z([1,ia]);

12 years ago | 1

| accepted

Answered
how to swap this matrix
Z([1,2]) = Z([2,1]); ADD Z = [2 4 2 1 7 9 1 1]; % new case a = [1, 2]; ...

12 years ago | 0

| accepted

Solved


Find the position of first minimum value in an integer array with numbers
If x = [2 6 4 9 10 3 1 5 1] the the output should be 7, because the first minimum value (1) lies at the 7th position.

12 years ago

Solved


Find the position of last minimum value in an integer array with numbers
If x = [2 6 4 9 -10 3 1 5 -10] then the output should be 9, because last minimum value (-10) lies at the 9th position.

12 years ago

Solved


Smith numbers
Return true if the input is a Smith number in base ten. Otherwise, return false. Read about Smith numbers at <http://en.wikipedi...

12 years ago

Answered
Creating new arrays from the elements of multiple arrays
B = cat(3,A{:}); out = permute(B,[3 2 1]); and out1 = num2cell(out,[1 2]);

12 years ago | 0

| accepted

Solved


Returning a "greater than" vector
Given a vector, v, return a new vector , vNew, containing only values > n. For example: v=[1 2 3 4 5 6] n=3 vNew =...

12 years ago

Solved


Find the maximum two numbers of every column of a matrix
Find the maximum two numbers of every column of a matrix. Example: If we input a matrix A = [ 1 2 4 6 0 3 ...

12 years ago

Solved


Convert a Cell Array into an Array
Given a square cell array: x = {'01', '56'; '234', '789'}; return a single character array: y = '0123456789'

12 years ago

Solved


Unit Matrix
Given n, you should return an n-by-n unit matrix. Example: If input is n=2 then A = [ 1 0 0 1 ] If input ...

12 years ago

Solved


Find nth maximum
Find nth maximum in a vector of integer numbers. Return NaN if no such number exists. x = [2 6 4 9 -10 3 1 5 -10]; So ...

12 years ago

Answered
Summing a Matrix, row by row.
A = [1,2,3;1,2,3;1,2,3] B = cumsum(A)

13 years ago | 1

| accepted

Answered
How to fill in this matrix?
reshape(repmat(1:24,[4,1,16]),1,[])

13 years ago | 1

Answered
Mean of matrix by columns
conv2(A,[.5 .5],'valid')

13 years ago | 1

| accepted

Load more