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

fast 4 Jahre vor | 2

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

fast 4 Jahre vor | 1

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

fast 4 Jahre vor | 0

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

fast 4 Jahre vor | 0

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

fast 4 Jahre vor | 1

| akzeptiert

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

fast 4 Jahre vor | 0

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

fast 4 Jahre vor | 0

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

fast 4 Jahre vor | 3

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

fast 4 Jahre vor | 2

| akzeptiert

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

fast 4 Jahre vor | 0

Beantwortet
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);...

fast 4 Jahre vor | 0

Beantwortet
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,[])

fast 4 Jahre vor | 0

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

fast 4 Jahre vor | 1

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

fast 4 Jahre vor | 1

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

fast 4 Jahre vor | 1

Beantwortet
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]); ...

fast 4 Jahre vor | 1

Beantwortet
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,[])); ...

fast 4 Jahre vor | 3

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

fast 4 Jahre vor | 0

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

fast 4 Jahre vor | 0

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

fast 4 Jahre vor | 0

| akzeptiert

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

fast 4 Jahre vor | 0

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

fast 4 Jahre vor | 0

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

fast 4 Jahre vor | 1

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

fast 4 Jahre vor | 1

| akzeptiert

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

fast 4 Jahre vor | 0

| akzeptiert

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

fast 4 Jahre vor | 0

| akzeptiert

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

fast 4 Jahre vor | 1

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

fast 4 Jahre vor | 0

| akzeptiert

Frage


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

etwa 4 Jahre vor | 0 Antworten | 3

0

Antworten

Beantwortet
`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) ...

etwa 4 Jahre vor | 1

Mehr laden