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

presque 6 ans il y a | 0

| A accepté

Réponse apportée
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)

presque 6 ans il y a | 0

Réponse apportée
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...

presque 6 ans il y a | 0

Réponse apportée
Largest Value from the Row Sums of A
Initialize with Largest = -Inf % and not 0

presque 6 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 6 ans il y a | 0

Réponse apportée
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...

presque 6 ans il y a | 0

Réponse apportée
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.

presque 6 ans il y a | 1

Réponse apportée
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, ...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
Create 9x9 matrix with RANDI between [0,2] with each 0,1, and 2 repeating three times each per column.
[~,A] = sort(rand(9)); A = mod(A,3)

presque 6 ans il y a | 1

Réponse apportée
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...

presque 6 ans il y a | 0

Réponse apportée
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))...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
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...

presque 6 ans il y a | 0

Réponse apportée
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...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
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 ...

presque 6 ans il y a | 0

Réponse apportée
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+...

presque 6 ans il y a | 1

Réponse apportée
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)); %...

presque 6 ans il y a | 0

Réponse apportée
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))...

presque 6 ans il y a | 2

| A accepté

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

presque 6 ans il y a | 1

| A accepté

Réponse apportée
how to create a matrix from another
x([2 4], end)

presque 6 ans il y a | 0

Réponse apportée
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

presque 6 ans il y a | 0

| A accepté

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

presque 6 ans il y a | 1

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

presque 6 ans il y a | 1 réponse | 2

0

réponse

Réponse apportée
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...

presque 6 ans il y a | 0

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

presque 6 ans il y a | 0

Réponse apportée
Set all elements of a sparse matrix to zero
B(:) = 0; C(:) = 0;

presque 6 ans il y a | 0

| A accepté

Réponse apportée
Is it posiible to hide a source code?
pcode myfun

presque 6 ans il y a | 1

| A accepté

Réponse apportée
Set of sequnce number
>> A = [1,2,3,4,5,6,7,8] A = 1 2 3 4 5 6 7 8 >> polyval(A,10) ans = 12345678...

presque 6 ans il y a | 0

Réponse apportée
Histcounts including values beyond bin edges
Append -Inf/+Inf in your finite edges

presque 6 ans il y a | 1

| A accepté

Réponse apportée
Meaning of less/greater than in handle objects
I believe the graphic handle object at one point of MATLAB history (before R2014b?) is just a double numbers unique assigned too...

presque 6 ans il y a | 0

| A accepté

Réponse apportée
How can I access the last values of a list using end?
list(end-3)

presque 6 ans il y a | 1

| A accepté

Charger plus