Question

Appdesigner cut/past bug?
When I open R2020b appdesigner of a mapp file created under R2020a, the cut and past menu is grayed out (and action using shortc...

20 jours ago | 0 answers | 0

### 0

How to compose a function n-times and want value for a particular value of n?
f = @(x) x.^2-x; n = 10; x = 1/pi; y = x; for k=1:n y = f(y) end % y is f^10(x)

21 jours ago | 1

| accepted

How to uniformly sample the surface of a sphere?
There are few methods avialable on File exchange such as this one.

21 jours ago | 1

| accepted

How to find all possible paths from point A to B in any direction in a matrix?
Tiny matrix of size 4 x 3. All paths of two opposite corners: 38 paths for 4-connectivity, 2922 paths for 8-connectivity c...

22 jours ago | 1

finding the unknowns in a matrix
More "robust" method [~,~,V] = svd(B); D1 = V(:,end); D1 = D1/D1(1);

22 jours ago | 0

| accepted

finding the unknowns in a matrix
[~,R,P] = qr(B); D1 = P*[R(1:end-1,1:end-1)\R(1:end-1,end); -1]; D1 = D1/D1(1)

23 jours ago | 0

Finding a row in a matrix that is closest to two separate conditions
Assuming the data is in yourarr rx = yourarr(:,5); iy = yourarr(:,6); z = rx + 1i*iy; ztarget = 1; [absdz, locmin] = min(ab...

24 jours ago | 0

Largest Value from the Row Sums of A
Initialize with Largest = -Inf % and not 0

24 jours ago | 0

| accepted

Is there a faster way to run my code?
For binary arrays r=rand(50,8)>0.5; C=rand(60,8)>0.5; [dmin, index_hard] = min(sum(xor(r,permute(C,[3 2 1])),2),[],3); ind...

24 jours ago | 0

Diagonal slices of 3D array
[I,J] = ndgrid(1:N); D1 = zeros(2*N,N); D1(sub2ind(size(D1),I,J)) = C(sub2ind(size(C),I,J,J)); D2 = zeros(2*N,N); D2(sub...

25 jours ago | 0

Is there any MATLAB toolbox that can find the local MAX of a piece-wise multi-variable function?
fmincon and friends if you have the toolbox.

26 jours ago | 1

How to perform logical AND on intervals of contiguous locations
x = logical([0, 1, 0,0, 1,1, 0,0,0, 1,1,1, 0]) y = logical([0, 1, 1,0, 1,1, 0,1,0, 1,0,1, 0]) code without loop or groupping, ...

27 jours ago | 0

| accepted

performing a least squares with regularisation in matlab
Simpless method: n = size(X,2); % 8 lambda = 1e-6; % <= regularization parameter, 0 no regularization, larger value stronger r...

28 jours ago | 0

Generate random sequence number with condition
P=interp1([0 0.9 1],[0.1 2 3.5],'pchip','pp'); n = 1e6; % 200 in your case % here is the array of random r=ppval(P,rand(1,n))...

28 jours ago | 0

| accepted

Is there a faster way to run my code?
Use knnsearch if you have the right toolbox (I don't so the code is untested) [index_hard, dist_hard] = knnsearch(C,r,'K',1,'Di...

28 jours ago | 0

Can someone provide me the theory and math behind this function of eigen?
for each column number j, A*V = B*V*D implies A*xj = lambdaj*B*xj where xj = V(:,j) lambdaj = D(j,j) This is just a gene...

28 jours ago | 0

| accepted

Is there any method to accelerate many small matrix and vector's "mldivide" (4*4)?
Use my FEX file of MultiSolver num = 4000000; A = rand(4,4,num); b = rand(4,num); x = zeros(4,num); tic for i=1:num ...

28 jours ago | 0

How do I swap the elements in the major diagonal with those in the minor diagonal?
x=[1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 1 2] s=size(x); m=min(s); n=s(2); i=1:m; id=sub2ind(s,i,i); iad=sub2ind(s,i,n+...

29 jours ago | 1

Efficiently calculating sum-thresholds across vector
This works regardless the sign of sample % Test data samples = 5*rand(1,10000); samples = samples+0.5*randn(size(samples)); %...

29 jours ago | 0

Find min and max of consecutive values in an array and save these values in a nx2 matrix
v = [670; 671; 672; 680; 681; 682; 700; 701; 702; 703] idx = find([true; diff(v(:))~=1; true]); minmaxseq = [v(idx(1:end-1))...

29 jours ago | 2

| accepted

Isolate first non-zero integer of each element of an array
A = [0.00663270674527115 36798861787.4757 0.0165559157141383 0.00845305563147772 0.000298646998074807 2561194549424.91]...

29 jours ago | 1

| accepted

how to create a matrix from another
x([2 4], end)

environ un mois ago | 0

Circulant Matrix [Column Wise Traversal]
function C= circulant(x) n=length(x); C=zeros(n,n); C(:,1)=x; for j=2:n C(:,j)=[C(n,j-1); C(1:n-1,j-1)]; end

environ un mois ago | 0

| accepted

Circulant Matrix [Column Wise Traversal]
function C= circulant(x) n = length(x); C = x(mod((1:n)'-(1:n),n)+1);

environ un mois ago | 0

Question

Memory leak with OPENGL hardware
Context: I have a matlab code that output a complex 3D graphic animation on GUI figure, involving patch, lines, markers, camera ...

environ un mois ago | 0 answers | 0

### 0

Obtain all integer partitions for a given integer
I wrote a short function that doesn't need to post-proceesed with UNIQUE (wast of time and memory) when using with NSUMK or allv...

environ un mois ago | 0

Circulant Matrix [Column Wise Traversal]
function C= circulant(x) toeplitz(x,circshift(flip(x),1)) end

environ un mois ago | 0

Set all elements of a sparse matrix to zero
B(:) = 0; C(:) = 0;

environ un mois ago | 0

| accepted