Réponse apportée
Can I loop through arguments and loop back to original names
Is this what you mean? inputs = {value, min, max}; for i = 1:numel(inputs) ... end [value,min,max]=inputs{:};

environ 3 ans il y a | 0

| A accepté

Réponse apportée
How are editors supposed to know the difference between transpose operators and character arrays?
A cheezy, but compact way you could define an alternative ctranspose operator (temporarily, within a particular workspace) is wi...

environ 3 ans il y a | 2

| A accepté

Réponse apportée
How are editors supposed to know the difference between transpose operators and character arrays?
This seems to offer Jupyter Lab integration in a way that preserves Matlab syntax highlighting, https://github.com/mathworks/j...

environ 3 ans il y a | 0

Réponse apportée
Raising a large sparse matrix to a large power
The actual recursion follows the structure x(n+1) = x(n) + AM^nBy(n) where each instance of x is a 5-by-3 matrix, A is 5-by-20,0...

environ 3 ans il y a | 1

| A accepté

Réponse apportée
Single iteration with lsqnonlin (or fsolve), only compute new X0
This seems to be a feasible workaround. So, the important thing to realize is that even though the iterative display says the Fu...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
Convolution of function on a non symmetric axis using 'conv'
This might be what you're after: % convolve model with resolution A1 = axconv(M1,R1,x); A2 = axconv(M2,R2,xx); fig...

environ 3 ans il y a | 1

| A accepté

Réponse apportée
Using a standalone application
You can certainly distribute it. Whether other people will be able to run it will depend on the manner in which you are dstribut...

environ 3 ans il y a | 1

Réponse apportée
Aggregate data every 10 seconds
This syntax of retime looks like the applicable one, TT2 = retime(TT1,'regular',method,'TimeStep',dt)

environ 3 ans il y a | 0

| A accepté

Réponse apportée
Can't plot contour graph on a different plane
figure(2) iy =1; contourf(squeeze(x_mesh(:,iy,:)),squeeze(z_mesh(:,iy,:)),squeeze(g(:,iy,:))) title('x^\prime z^\prime plane'...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
how to solve diagonal matrix of each page of a 3D vector ? pagediag?
A=rand(1,4,3) [~,n,p]=size(A); B=zeros(n^2,p); B(1:n+1:end,:)=reshape(A,n,p); B=reshape(B,n,n,p)

environ 3 ans il y a | 0

Réponse apportée
Radon Transform works unexpectedly
Instead of radon(), you could use one of the parallel beam forward projectors (the SIddon algorithm is probably best) from the T...

environ 3 ans il y a | 2

| A accepté

Réponse apportée
Split data into groups without applying a function
G=findgroups(Gender); groupedHeight=splitapply(@(x){x}, Height,G)

environ 3 ans il y a | 0

| A accepté

Réponse apportée
The best approach to avoid the Kullback–Leibler divergence equal to infinite
% Input A =[ 0.444643925792938 0.258402203856749 0.224416517055655 0.309641873278237 0.0...

environ 3 ans il y a | 1

| A accepté

Réponse apportée
Identify the point where three lines are meeting, thus making a Y section.
Use delaunay to form the delaunay triangulation and then freeBoundary to find which vertices are on the boundary. The vertices t...

environ 3 ans il y a | 0

Réponse apportée
Computing variance of a variable after linear fit using lsqcurvefit function
It would be, yvariance = [1,x0]*ACovariance*[1;x0]

environ 3 ans il y a | 0

Réponse apportée
Solving Matrix Equations With Unknown at Both Sides
T1=optimvar('T1'); T2=optimvar('T2'); F2=optimvar('F2'); prob=eqnproblem; prob.Equations.eqn=[1 -0.5 4;-0.5 2 0; 4 0 3]*[T...

environ 3 ans il y a | 0

Réponse apportée
Solving Matrix Equations With Unknown at Both Sides
Since these are linear equations, you would re-arrange in the form Matrix*[T1;T3;F2] =[4; 0; 5] and solve normally.

environ 3 ans il y a | 0

Réponse apportée
How to divide a 400x800 matrix to 8x8 blocks?
Processing is usually faster if you keep the data in numeric form. Using this FEX download, https://www.mathworks.com/matlabce...

environ 3 ans il y a | 0

Réponse apportée
How to divide a 400x800 matrix to 8x8 blocks?
Easier to use mat2tiles from this FEX download, https://www.mathworks.com/matlabcentral/fileexchange/35085-mat2tiles-divide-ar...

environ 3 ans il y a | 0

Réponse apportée
I have a matrix. I want to count number of only those zeros which are lying between 2 sets of consecutive nonzero values on each side. How to do? Desired result given below
Using this FEX download, https://www.mathworks.com/matlabcentral/fileexchange/78008-tools-for-processing-consecutive-repetition...

environ 3 ans il y a | 0

Réponse apportée
delete special characters (\ / : * " < > |) in char
One way: name_1 = '<Hello World>'; pat=num2cell('\/:*"<>|'); name_1=erase(name_1,pat)

environ 3 ans il y a | 0

| A accepté

Réponse apportée
delete special characters (\ / : * " < > |) in char
One way: name_1 = '<Hello World>'; tf=ismember(name_1, '\/:*"<>|'); name_1(tf)=''

environ 3 ans il y a | 1

Réponse apportée
Change a repeated number with the times the number is repeated in an array.
yourCell={[8.1,2.7,8.1,8.1,2.7]; [6.3 6.3,4,5,6.3]} result = cellfun(@fun, yourCell,'un',0) function y=fun(x) ...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
I cannot run the "fmincon" solver.
error = norm(T_gas_outlet_est - T_gas_outlet).^2;

environ 3 ans il y a | 0

Réponse apportée
array of anonymous function
clear obj for k=3:-1:1 obj{k} = @(V) I_fun(V, I0, IL, Rs, Rp, Vt_Ta) - target_value; fplot(obj{k},[0 55],'LineWidth',...

environ 3 ans il y a | 0

| A accepté

Réponse apportée
delete columns inside a cell based on null elements
map = cellfun('isempty',union_cell) tf=all( map(3:5,:),1); union_cell(:,tf)=[]

environ 3 ans il y a | 0

| A accepté

Réponse apportée
An alternative for strlength function for MATLAB 2013
There were no string data types back then, only char vectors, so you could just use length() or numel().

environ 3 ans il y a | 1

| A accepté

Réponse apportée
How can I solve this problem? "Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 8.375012e-18"
I believe the error originates from avec = Mm\b If so, it is because the Mm matrix is singular. The solution would be to make i...

environ 3 ans il y a | 0

Réponse apportée
How can I record data from a parfor loop into an array?
Why is this not possible From the documentation for sliced variables (which array is supposed to be in this case): Form of Ind...

environ 3 ans il y a | 1

| A accepté

Réponse apportée
Alphashape boundary detection not working as desired
Try bwlalphaclose() from this FEX submission, https://www.mathworks.com/matlabcentral/fileexchange/90762-further-tools-for-ana...

environ 3 ans il y a | 0

Charger plus