Risposto
How to multiply different size arrays and multiply each element by each element?
Download ndgridVecs from the File Exhange, https://www.mathworks.com/matlabcentral/fileexchange/74956-ndgridvecs?s_tid=srchtitl...

circa un mese fa | 0

Risposto
Error using trainnet (line 46)
It appears that if your XTrain is in cell array form, you need to put your TTrain data in cell form as well: load('attachedData...

circa un mese fa | 1

| accettato

Risposto
Indexing a 4-D array using a logical matrix
Assuming you are trying to extract the polygon interiors, you could do, [~,~,p,q]=size(map); Map=reshape(map,[],p*q); tes...

circa un mese fa | 0

| accettato

Risposto
What is the difference between different ways to do least square
The train_100 system is underdetermined, so of course you aren't going to get a unique solution. For the 5k data, the only rea...

circa un mese fa | 1

| accettato

Risposto
How to change the ratio of sectors for a circle with 8 equal sectors
One possibility: dTheta=360/8; %sector angle t=linspace(0,dTheta)'; sector=polyshape([0,0;cosd(t),sind(t)]); circle=array...

circa un mese fa | 0

| accettato

Risposto
How to convert trajectory of the current vector to grayscale.
Maybe this is what you wanted? load("data.mat") Ia = data(:,1); Ib = data(:,2); Ic = data(:,3); %% Clarke (3 phase → αβ...

circa un mese fa | 1

| accettato

Risposto
optimization optimplot capture frame
optimplot does not plot in a figure container of the type that you can get a handle to. Prior to R2025, you could probably have...

circa un mese fa | 0

| accettato

Risposto
Preconditioning in fmincon
EDIT: You cannot pass a preconditioner on its own, nor would you want to if the true Hessian can be computed. However, using eit...

circa un mese fa | 0

Risposto
How can I fit data to a piecewise function, where the breakpoint of the function is also a parameter to be optimised?
Why ? Both parabola can intersect below their respective maxima, and nonetheless the point of intersection can be the maximum y-...

circa 2 mesi fa | 0

Risposto
How can I fit data to a piecewise function, where the breakpoint of the function is also a parameter to be optimised?
Once you've chosen the coefficients of the first parabola [a1,b1,c1], the breakpoint is determined from, d=-b1/(2*a1) Only the...

circa 2 mesi fa | 0

| accettato

Risposto
suprisingly complicated optimization problem
This is another suggested strategy: to find the minimum possible qmax, given L. This seems at the very least like an important f...

circa 2 mesi fa | 1

Risposto
suprisingly complicated optimization problem
The motivation of this problem is the creation of the so called, "homogenized" 1-D grid, where consecutive distances between ele...

circa 2 mesi fa | 0

Risposto
suprisingly complicated optimization problem
Here's another formulation, closer to your original one. It uses fmincon and is really fast (when the problem is feasible), but ...

circa 2 mesi fa | 1

Risposto
suprisingly complicated optimization problem
My thought is that you, (1) Do not include L in your list of unknowns. Solve a series of optimization problems for fixed L=1,2,...

circa 2 mesi fa | 2

Risposto
How to check whether a name is a locally accessible function?
One way, function tf = top_level_function(name) s=functions(str2func(name)); tf=strcmp( s.type , "scopedfunction") ...

circa 2 mesi fa | 0

| accettato

Risposto
how to find orthonormal vector with condition?
n=[0,null([y,z])']

circa 2 mesi fa | 0

Risposto
Error `Index exceeds the number of array elements` while loading .mat file
You have created a variable named 'load' in this line, load = 0; % 轴承的载荷(单位:马力)(可能是0、1、2、3马力) and later also in,...

circa 2 mesi fa | 1

Risposto
AppDesigner: Is it possible to interactively stretch/schrink plots ("Axes") in x or y direction separately (NOT zoom in/out both)?
This example looks applicable to you: Restrict Zooming to X-Dimension.

circa 2 mesi fa | 0

Risposto
how to create the number of equations from a correlation matrix by excluding the most correlated variables?
That sounds like a bad idea. Normally, in MATLAB, you wouldn't write your equations in scalar form. You would write a matrix equ...

circa 2 mesi fa | 0

| accettato

Risposto
Unable to use structName.?ClassName for VideoWriter class
The .?Classname syntax only works on the class properties with public SetAccess. Unfortunately, the VideoWriter class does not h...

circa 2 mesi fa | 2

| accettato

Risposto
Closed contour with least square differences to dataset
A closed curve, e.g. a circle, would usually satisfy an implicit equation F(x,y)=0 The way to approach that is with implicit e...

circa 2 mesi fa | 0

Risposto
Polyfit isn't adjusting to decreasing sinoidal data
Polynomial fitting above 10 degrees or so is a famously ill-conditioned numerical task, see also, https://en.wikipedia.org/wiki...

2 mesi fa | 0

Risposto
The keyboard shortcut to change focus to the editor doesn't work.
Try first dragging the editor window into focus manually with the mouse. Then, check if Ctrl+0 and Ctrl+Shift+0 toggles the edit...

2 mesi fa | 0

Risposto
how to filter columns
m=576; n=1000; k2=randi([0,1],m,n).*rand(m,n); tic; r=max( (k2==0)'*k2 ,[],2); toc;

2 mesi fa | 0

Risposto
Get extrinsic camera parameters from pose estimation
From the documentation for estimateMonoCameraParameters, it appears that the camera is assumed to lie at a translation of C=[0,0...

2 mesi fa | 0

| accettato

Risposto
Mean of 3D matrix based on range of first dimension
This might seem a little counter-intuitive, but the key is that it avoids extracting a submatrix (an expensive op) from the inpu...

2 mesi fa | 0

Risposto
Measuring Line Profiles in IMages
I=im2double(im2gray(imread('image.png'))); BW=imbinarize(I); D=bwareaopen(abs(gradient(I))>0.06,20); D=imclose(D,strel('d...

2 mesi fa | 0

| accettato

Risposto
do we have any pre provided function for reitveld refeinement in matlab
No, there is no dedicated crystallography toolbox in Matlab. You could build your own with Optimization Toolbox functions like l...

2 mesi fa | 0

Risposto
Issues creating error bar for bar figure
Here's an MWE: x = ["A"; "B" ] ; y = [3,4] ; err = [0.5,0.75] ; bar(x, y); hold on errorbar(categorical(x),y,err,'r',...

2 mesi fa | 1

| accettato

Risposto
How to set a protected superclass property from subclass method?
You cannot use the ?.MVA syntax on non-public properties. Since you already have validation in the base class, I don't think you...

2 mesi fa | 0

Carica altro