已回答
Finding the max number of non-zero repeating elements for each row in a large matrix
This code would not requires too much RAM beside a copy of A transposed. It somesort of vectorized runlength encoding. A little...

4 years 前 | 2

已回答
Is it possible to have an ode solver solve in chronological order?
@Isabella "Also looking at the ode45 documentation, I do see that it solves using the previous timestep, so I'm now looking into...

4 years 前 | 1

已回答
How to specify breaks for spline fitting?
It seems I iedit again a wrong post that is not mine ! Sorry that happens for people who is distracted like me, probably age is ...

4 years 前 | 0

已回答
How to find out TSP of a graph.
Have you tried this https://www.mathworks.com/help/optim/ug/travelling-salesman-problem.html

4 years 前 | 0

已回答
Update doesn't work, is uninstall and reinstall too risky?
May be the safest is to download the full installation (with update 3) locally, then install it if you are willing to take the r...

4 years 前 | 1

| 已接受

已回答
Could anyone please explain why MATLAB doesn't return answer to this code?
Walter is correct, you should break the interval and do integration on each sequentially clc, clear % Inputs: g0 = 1.62; ...

4 years 前 | 0

已回答
How to find inverse of filter such that product of filter and its inverse results in a flat spectrum
If you are working if IIR filter faminy then the answer is trivial yes, since the inverse of the franfert function if a fraction...

4 years 前 | 0

已回答
Find out whether a 2D line (y = a*x + b) intersects with a square without using "solve" (I need something faster)
This shoudl do: % example line parameters: a = 1.61; b = -3.1; % example square parameters: x_min = 7.5; x_max = 8.5; ...

4 years 前 | 3

已回答
Improve speed of linear interpolation in nested loops
This seems to work clear clc close all nx = 40; % grid size for x nb = 45; % grid size for b nk = 55; b_min = -1...

4 years 前 | 2

| 已接受

已回答
Find value of signal A at a given value of signal B (twice for every cycle)?
You can fit a model to the interpolated data to remove the jump due to interval leap ab=load('file1.txt'); a=ab(:,1); b=ab(...

4 years 前 | 0

已回答
how to modify the variables for changing FOR loop to PARFOR loop??
Could you try this inner loop (EDIT fix issue with 0 label): final_lmatrix = 0; parfor n = 1:new_regions region = (L==n);...

4 years 前 | 0

已回答
To generate a series with n numbers on and n numbers off
n=4; x=reshape(n+(0:10)*2*n+(0:n-1)',1,[])

4 years 前 | 0

已回答
integral function gives the wrong answer
The function need to be "vectorized", i.e. able to work on an input that is a vector when using with integral I = integral(@(X)...

4 years 前 | 1

已回答
I'm trying to convert a 1 dimension lat,lon,data to 2d data . Is this possible?
T = readtable('chiranjit Das DAY_1.xlsx'); A = table2array(T); lat=A(:,1); lon=A(:,2); data=A(:,3); longrid = -180:180;...

4 years 前 | 1

已回答
what the time span do in ode45?
No, it means exactly what in the doc says "tspan — Interval of integration vector Interval of integration, specified as a vec...

4 years 前 | 1

已回答
finding the orthogonal vectors for a series of vectors
A direct method for vectors in R^3 a=rand(100,3); % but be non zeros % Generate b and c orthogonal to a a2 = a(:,[2 3 1]); ...

4 years 前 | 1

已回答
finding the orthogonal vectors for a series of vectors
If you have recent MATLAB (from 2021b) % Invent some test data xhat = rand(10,3); [B,~,~]=pagesvd(reshape(xhat',3,1,[])); ...

4 years 前 | 3

已回答
Speed improvement of repeated cross-correlation of an "almost same area" ?
Shift by 1 can be decomposed rotate by 1, follow by add the first/last element by the new entry - the value of other side So...

4 years 前 | 0

已回答
Sort values in a cell array
Another method B=[8,1,8,3]; A=[90,45,38,51]; [Bs,i]=sort(B); mat2cell(A(i),1,diff(find([true,diff(Bs)>0,true]))) % or mor...

4 years 前 | 0

已回答
How to match pair of two elements of a matrix with the pair of two elements of another matrix?
A= [1 3; 5 9; 7 6; 10 8] B = [10 8; 7 6; 70 16; 1 3; 12 34; 5 9; 20 45; 10 8] [tf,loc] = ismember(B,A,'rows'); rowindexInA = ...

4 years 前 | 0

| 已接受

已回答
extract control points of curve with spline
Calm down, if you have 1D data, this FEX function provides to compule the spline with reduced knots to approximate the data. Th...

4 years 前 | 0

已回答
Parfor loops indexing into table rows
This works, but I'm not sure is what you want. IMO table is not well-suited data structure to do calculation. Simple raw numeri...

4 years 前 | 0

已回答
Why MATLAB coder is crashing while generating trial code with an assertion failed message.
IMO the assertion fault is not the cause but an indicator that you passed the data that are not of the size/class of what the co...

4 years 前 | 1

已回答
How to reshape the three dimensional array in 2D matrix?
A = reshape(pagetranspose(val),[],size(val,3))

4 years 前 | 1

| 已接受

已回答
Decimal and very small values returning zeros
Is is more subtle than I though. You should not use 'ArrayValued'==true to evaluate a series of integral. The use case is to in...

4 years 前 | 0

| 已接受

已回答
Matlab hidden optimization at the fifth execution
I don't think so. I believe it is related to JIT optimization Executio Engine (EE), some code are not "compiled" at the first fe...

4 years 前 | 0

| 已接受

已回答
Extract Source Code from Compiled App
"Is it possible to extract or reconstruct the Source Code from a compiled app?" The source code is obfuscated, only TMW and co...

4 years 前 | 1

已回答
How do I display "Busy" like that in MATLAB when simulation is running in GUI?
Create a static text somewhere i the GUI and set the string to "busy" before runing simumation tjen "done" once finished. You c...

4 years 前 | 0

| 已接受

提问


What algorithm pagemldivide uses?
The question starts here from Paul remark that pagemldivide does not return the same numerical solution than backslash "\" appli...

4 years 前 | 0 个回答 | 3

0

个回答

已回答
`svd` sometimes blows up - how to fix it?
The thread subject is missleading, SVD does NOT blow up, what blowed up is PINV and it's normal given : >> cond(test_matrix) ...

4 years 前 | 1

加载更多