Réponse apportée
How permutate 2-by-2 matrices in a single matrix
a = [1,2;3,4]; b = [2,5;1,6]; c = [3,7;2,4]; abc= {a,b,c}; abc=perms(abc) abc=cell2mat(abc)

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
How do I split an array into small array of fixed size with increments by 1?
A=randi(10,1,10) k=4; B = hankel(A(1:end-k+1),A(end-k+1:end))

plus de 3 ans il y a | 1

| A accepté

Réponse apportée
What kind of Interpolation Algorithm Will be Applicable for the Following data set to obtain smooth curve?
It looks like your data has a couples of pairs/tripples that are closely spread. I suggest to merge thme to a single point then...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Finding unique closest point corresponding to latitude and longitude vectors for a given point with shortest distance.
Use dsearchn on lon/lat is wrong. The right procesure is convert lat/lon to 3D coordinates (for both list P and PQ use dnsear...

plus de 3 ans il y a | 1

Réponse apportée
Generate all permutation or possibilities
s='locate' n=3; c=nchoosek(s,n); c=reshape(c(:,perms(n:-1:1)')',n,[])'

plus de 3 ans il y a | 0

Réponse apportée
Solve system of equations with some knowns and unknowns in the same matrix
% Random example A = rand(5,5); x = rand(5,1), b = A*x, [m,n] = size(A); % put NaN at the position where x is unknown; x...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
How do I extract the first non-zero value from array after specified number of zeros?
Basic for-loop programing x=[1,2,0,0,3,4,0,5,6,7,8,9,0,0,0,0,0,0,0,0,0,0,0,0,0,11,12,13,0,14,0,0,15,16,17,0,0,0,18,19,0,0,0,0,0...

plus de 3 ans il y a | 0

Réponse apportée
Load and Save using PARFOR Loops
Normal parfor ii = length(files) should be parfor ii = 1:length(files)

plus de 3 ans il y a | 1

| A accepté

Réponse apportée
Model fit using fminunc based on measured data
kB = 8.617 * 1e-5; % in eV/K x1 = [233; 264; 295; 326]; % temperatures x2 = [420000; 970000; 3800000; 10000000]; % lifetimes ...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
converting uint8 to double in a faster way
dotspos = double(cat(4,temp.cdata));

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Finding the most common element in the first row of a matrix
Use mode command [v,f]=mode([ 2 3 4 5 5 5 6 7 7])

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Alternative ways to generate a structure from strings without using eval?
If you want to avoid EVAL you can parse the char array and transform it to S and B arguments of subsasgn function Do the same w...

plus de 3 ans il y a | 1

Réponse apportée
concatination of matalb structures with diffrent set of fields in recursive call
Try to include the following function and replace in your code cat(1, ...) by catstruct(1, ...) function S = catstruct(dim...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Variable in function as well as integral boundary
I have no idea if the code correspondons to the formula; I just modify your code to make it work on array theta = 1:90; A = 0....

plus de 3 ans il y a | 2

Réponse apportée
Which one is the right answer, sum(w(:)) or sum(sum(w))?
"Since I am quite new to MATLAB, can anyone tell me, is there any other function or Best Practical method to solve such problem?...

plus de 3 ans il y a | 0

Réponse apportée
How would you make these for loops dynamically recursive?
https://fr.mathworks.com/matlabcentral/fileexchange/17818-all-permutations-of-integers-with-sum-criteria It will return 6435 so...

plus de 3 ans il y a | 1

Réponse apportée
what precautious should i follow before upgrading to higher matlab version?
If you use third party compilers make sure it is still supported by the new version. In general make sure your PC meets the req...

plus de 3 ans il y a | 1

Réponse apportée
Permutation with repeating elements.
Just brute force of filter out what is considered as duplicated g = [1 1 2 2 3 3 3]; x = 1:7; p = perms(x); [~,i] = unique...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
How to step through vector permutations in a parallel loop, without generating all permutations in advance?
function getenumperm bellow enumerates the permutation of 1:n n = 4; for k=1:factorial(n) % or parfor p = getenumperm(k, ...

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
matrix multiplcation in loop
X is three dmiensions nit 4 as you wrote A=[2 3; 4 5]; B=[3 4; 5 6]; X = B .* reshape(A.', 1,1,[])

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Change sequence of consecutive trues to falses, in logical array
x=[true;false;false;true;true;true;true;true;false;true]' x & ~([false,x(1:end-1)]&[x(2:end),false])

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Can anyone tell me how to generate a binary orthogonal complement of a given binary matrix ??
I'm not expert of calculation in finit field, so just use brute force, there are 63 vectors that are orthogonal to the s you pro...

plus de 3 ans il y a | 0

Réponse apportée
I have several multiple cell arrays with different sizes, and I want to find the intersection of all the arrays at the same time
This is what you want https://fr.mathworks.com/matlabcentral/fileexchange/66614-mintersect-varargin

plus de 3 ans il y a | 0

Réponse apportée
Find maximum of quadratically constrained quadratic problem using MATLAB
The problem of least-square minimization under quadratic constraints is known to might have many local minima. So if you use fmi...

plus de 3 ans il y a | 1

Réponse apportée
A compact way to find max in one column with a condition on the second column
a = [35 -1 21 1 11 2]; max(a(a(:,2) ~= -1,1))

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
How do I speed up my variable lookup algorithm?
Try this % Fake data slantvals = randi([0 10], 1, 224*320*320); var = rand([5,5,5]); slantinds = randi(length(var),[numel(sl...

plus de 3 ans il y a | 0

Réponse apportée
how to find correlation of a row with all the other rows of a matrix ?
If you have the right toolbox, use https://fr.mathworks.com/help/stats/corr.html

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
How to use the SUM() function..?
You overshadow sum function make sure to run clear sum before runing your code

plus de 3 ans il y a | 0

| A accepté

Réponse apportée
Efficient way to assign indices to variables in a matrix
Timings with my brand new laptop with Jan's code Elapsed time is 0.004218 seds. % ISMEMBER Elapsed time is 0.001169 seconds. %...

plus de 3 ans il y a | 1

Réponse apportée
An error in filtfilt
Don't tranpose your date if you want to filter along the long dimension sig= P01EC1(:,:);

plus de 3 ans il y a | 0

| A accepté

Charger plus