回答済み
The difference between performing the fft2 and the convolution
Use this function, it will perform the convolution using fft method rightly https://www.mathworks.com/matlabcentral/fileexchang...

4ヶ月 前 | 0

回答済み
How can I rotate the axes' labels parallel to the orientation of the axes?
Try this (the letters of label are rotated but the aspect ratio remain constant so they can be read easily but are not look like...

4ヶ月 前 | 0

| 採用済み

回答済み
Compact way to calculate the centroid of a boundary of a set of points
@Sim The area of the polygonal (A in the book) is sum(A)/2 in Jan code. So sum(A)*3 in Jan's code is equal to 6*area. They are...

4ヶ月 前 | 0

回答済み
Mex function Implementation for nested-functions
you did not include operation.c in mex command

4ヶ月 前 | 2

| 採用済み

回答済み
Strange warning how to interpret it?
Fixed with update 4 https://www.mathworks.com/support/bugreports/3114312

4ヶ月 前 | 2

| 採用済み

回答済み
Compute only a few entries of a big matrix product
It will not store the result in 2D matrix but 3D array. I hope you can switch to this format of storage. x=rand(10000,10); k =...

4ヶ月 前 | 0

| 採用済み

回答済み
Matrix addition only to elements equal to zero
C=B; B0 = B==0; C(B0)=A(B0);

4ヶ月 前 | 0

| 採用済み

回答済み
Code gets stuck loading when I try to run it.
First look of your code shows that you do this mistake: https://www.mathworks.com/help/matlab/matlab_prog/preallocating-arrays....

4ヶ月 前 | 0

回答済み
How to efficiently calculate a weighted sum of 3 dimensional matrix through a vector in matlab
This uses matrix multiplication so it should be well optimized and fast. [m,n] = size(A, [1 2]); C = reshape(A,m*n, []) * B(:)...

4ヶ月 前 | 2

| 採用済み

回答済み
Matrix inverse in objective function
The inv() is not supported by optimization expression see https://www.mathworks.com/help/optim/ug/supported-operations-on-optimi...

4ヶ月 前 | 0

| 採用済み

回答済み
Find all possible combinations of numbers with a specific array length
char(dec2base(0:4^12-1,4)+('A'-'0'))

4ヶ月 前 | 1

回答済み
Order of code execution seems weird
%% Function in app.PlotSetup function printProcess(app, message) app.StatusEditField.BackgroundColor = app.yellow; app.Status...

4ヶ月 前 | 1

回答済み
how to use plot to draw a minor arc in matlab without calculating the angle range?
% Generate A, B, C, C is the center and A B are two points on circle r = rand(); C = randn(2,1); phi1 = 2*pi*rand; A = C + r...

4ヶ月 前 | 1

回答済み
Multipilication of N-dimension array
D = rand(3, 3, 3); rotm1 = rand(3, 3, 2); for num=1:size(rotm1,3) for i=1:size(D,3) res(:,:,i,num)=rotm1(:,:...

4ヶ月 前 | 1

回答済み
Why does C{1}(1) work but C(1){1} results in an invalid array index error in MATLAB?
"I would like to understand the rationale behind MATLAB's requirement for parentheses indexing to appear last in an indexing exp...

5ヶ月 前 | 0

回答済み
How can I produce this matrix?
m=6 n=3 j=randperm(m,n-1); A=accumarray([2:n;j]',1,[n,m]); A(1,setdiff(1:end,j))=1

5ヶ月 前 | 1

| 採用済み

回答済み
Implicit expansion for griddedInterpolant
You can do your own extension as showed here https://www.mathworks.com/matlabcentral/answers/2043017-bilinear-interpolation-fas...

5ヶ月 前 | 0

回答済み
Linking Matlab Libraries to Mingw for Another C++ Program
You need https://www.mathworks.com/products/matlab-compiler-sdk.html

5ヶ月 前 | 0

回答済み
matrix value propagation along the rows
Any of these should do A = [1 2 3 4 5 6 7] B(1:19,1:7)=repmat(A,19,1) B(1:19,1:7)=repelem(A,19,1) B(1:19,1:7)=A(ones(1...

5ヶ月 前 | 0

| 採用済み

回答済み
Bilinear interpolation faster than interp2?
Try this, about 5 time faster for your example clc close all n = 7; nq = 30; curv = 2.5; %qinterp2 works properly only if c...

5ヶ月 前 | 1

| 採用済み

回答済み
adding all fields of a structures
s.bin_1=array2table(rand(2,3)); s.bin_2=array2table(rand(3,3)); s.bin_3=array2table(rand(4,3)); c=struct2cell(s); newstruc...

5ヶ月 前 | 0

回答済み
How to calculate the computational complexity of filtfilt low-pass filter?
filtfilt just do twice (forward + backward) the filter. In your case it is IIR, where the complexity is O((length(a)+length(b))...

5ヶ月 前 | 0

| 採用済み

回答済み
How do I include or make a discrete variable for an optimization problrm?
To restrict x1 to { 2, 5, 7, 8 } You might make slack variables x1 = 2 + 3*y1 + 2*y2 + 1*y3; with constrants y1, y2, y3 inte...

5ヶ月 前 | 0

回答済み
Proper way to call designfilt for filtfilt
@Paul I have a question, you select the original phase for sqrtVfreq sqrtVfreq = sqrt(abs(Vfreq)).*exp(1j*angle(Vfreq)); Is it...

5ヶ月 前 | 0

回答済み
Collaborative work environment in app designer
We are not working with App Designer but with GUI, and we have the same issue, there is np way to merge or rebase correctly dif...

5ヶ月 前 | 0

| 採用済み

回答済み
Can I use a Matlab function as a callback of a C library when using loadlibrary and calllib ?
No MATLAB function are propritary and cannot directly inferfacing with anything (else). You have to wrap it in appropiate interf...

5ヶ月 前 | 1

回答済み
How to find the matlab interp1 computational complexity?
If N is the number of data points (x, y), M is the query points (xq) interp1(x, y, xq, ...) has complexity of O(M*log(N)) for ...

5ヶ月 前 | 0

| 採用済み

回答済み
Generate all possible permutations including repeats
F = [0,1,2]; combinations(F,F,F)

5ヶ月 前 | 0

| 採用済み

回答済み
Creating equidistant point on a 2D boundary plot
Check out https://www.mathworks.com/matlabcentral/fileexchange/34874-interparc

5ヶ月 前 | 1

| 採用済み

回答済み
Related to finding columns of a matrix satisfying specific conditions
% Generate a test matrix X = rand(8, 500); X(:,10) = [0 0 3 0 5 0 0 0]; X(:,20) = [0 0 0 0 5 0 0 0]; % won't be detected si...

5ヶ月 前 | 0

さらに読み込む