Réponse apportée
Update from MATLAB 2023a to 2023b points to wrong URL link
Download from the website https://www.mathworks.com/downloads/

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Different optimization solutions with weighted objective functions
They are all optimal solution since the number of 1 + number of 3 are 7 in 4 cases. Your objective function (divided by w) are ...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
I want to plot a transparent triangle
Semi transparent, set FaceAlpha from 0 (100%transparent) to 1 (opaque) W = 0.5; L = 0.3; Patch = [-0.3, -W/2; -0.3, W/2; L, 0...

plus de 2 ans il y a | 0

Réponse apportée
What is a simple way to check if a collection of vectors all have the same number of elements
if any(n(1)~=n) The above will crash if your cell is empty. IMO if any(diff(n)) is a more robust test. Thus you can do the ...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Optimizing distance calculation between vectors and pixels
This is different function that return the squared of the distance. I simplify the code and use instructions that I think it's ...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Largest portion of largest correlation coefficient
% dummy data x = rand(1,500); x = x + +0.01*randn(size(x)); x = sort(x); y = x.^2+0.01*randn(size(x)); cthreshold = 0.99;...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Create a mesh within a triangle and interpolate within this mesh
coords=[470590,7333138;470642,7333275;470643,7333214]; v=[1 2 3] ; % data values at each vertices of the triangle x=coords(:,1...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Inconsistent Results When Evaluating a Typecast and Reshape Operation in MATLAB
Do NOT enter the value from the screen display of a number format long, u1=typecast(uint8([48 41 161 113]),'uint32'); s1=sing...

plus de 2 ans il y a | 0

Réponse apportée
calculate volume from iso-surface coordinates (x,y,z).
Do you have connectivity face of these points coordinates? If you use the command isosurface https://www.mathworks.com/help/mat...

plus de 2 ans il y a | 0

Réponse apportée
specifying constraints on a spline function
I enforce the curvature to be negative in the x-interval (350,450) load('data.mat') nknots = 20; knots = linspace(min(xb),m...

plus de 2 ans il y a | 0

Réponse apportée
How do I access cell array using names contained in master cell array?
First thing to do is to convert your data to struct or table or whatever suitable for your data. mystruct = struct(); for fc =...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
QR factorization of a low rank matrix
Here is the Gram-Schmidt orthoganalisation algo that stops at the given ranks (arbitrary, not necessary 2). Again I don't think...

plus de 2 ans il y a | 0

Réponse apportée
QR factorization of a low rank matrix
Just use MATLAB qr. I don't think you have a chance to beat Blas function with standard MATLAB program, even if you know rank <=...

plus de 2 ans il y a | 0

Réponse apportée
Return largest number of decimal places in a vector of numbers
Good point from @Image Analyst, but I would add a comment: All finite floating numbers when translated to decimal MUST eventual...

plus de 2 ans il y a | 2

Réponse apportée
Moment of Lognormal distribution
https://en.wikipedia.org/wiki/Log-normal_distribution "All moments of the log-normal distribution exist and"

plus de 2 ans il y a | 0

Réponse apportée
Return largest number of decimal places in a vector of numbers
Check out the second input of num2str in the doc (in general always read the doc throughly most of the time the answer is right ...

plus de 2 ans il y a | 0

Réponse apportée
how can we find the coordinates of more points besides the points automatically generated by Contour in MATLAB?
Not sure if you need more contour (more levels) or denser contour. For the first case check the doc of contourf the level param...

plus de 2 ans il y a | 0

Réponse apportée
Alternate search functions to speed up code
The below code takes % Elapsed time is 48.221007 seconds. on my PC. Improvement are: use delaunayTriangulation instead of ...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
I want to find the eigenvectors of a matrix corresponding to imaginary eigenvalues.
Use imag function A=rand(5); [V,d]=eig(A,'vector'); iscmplx=imag(d)~=0 d=d(iscmplx) V=V(:,iscmplx) % corresponding eigen ...

plus de 2 ans il y a | 1

| A accepté

Réponse apportée
Draw samples using a Non-Gaussian distribution
x = rand(1,10000); % whatever, randn(1,100) in your case n = 5000; % number of drawing 50 in your case % Set up wanted d...

plus de 2 ans il y a | 0

Réponse apportée
Identifying regions in matrix rows
matrix = zeros (5,8) -1; matrix(1,1:3) = 1:3; matrix(3,2:3) = 2:3; matrix(3,5:7) = 5:7; matrix(4,2:5) = 2:5; matrix dummy...

plus de 2 ans il y a | 0

| A accepté

Réponse apportée
Is there a way to get 10-base lognormal distribution data?
log10rnd = @(mu,sigma, varargin) lognrnd(log(10)*mu, log(10)*sigma, varargin{:}); N = log10rnd(5, 10, [1 1000000]); % Chec...

plus de 2 ans il y a | 0

Réponse apportée
Optimization of a matrix with integers and constraints for a car park
Here is formalization with intlinprog (solver base) m = 4; n = 5; % Bruno repeat pattern solution A0 = repmat([3 2; 0 1], ...

plus de 2 ans il y a | 1

Réponse apportée
Unrecognized method, property, or field 'Value' for class 'matlab.ui.control.Button'.
Only state button has property value that you can toggle. It seems you have created a simple push button. See https://www.mathwo...

plus de 2 ans il y a | 1

| A accepté

Réponse apportée
Removing white space when using axis equal
Call axis tight after axis equal figure imagesc(rand(10,50)) axis equal axis tight

plus de 2 ans il y a | 0

Réponse apportée
How to make same subplot size at different figures regardless of the number of sub-plot?
Just copy the axes position in pixel then adjust the figure height if wished fig1 = figure(1); ax1 = []; ymax1 = 0; for k=1:...

plus de 2 ans il y a | 0

Réponse apportée
Why does the rand function in the assignment statement within the class's property only work once?
"Shouldn't MATLAB re-execute the rand function when executing `obj4 = ValueClassA();` or `y = obj4.a" No since the doc said "M...

plus de 2 ans il y a | 1

| A accepté

Question


Strange warning how to interpret it?
I get this strange warning in command window when MATLAB starts (R2023b) "[WARN] StAXDialectDetector - Unable to determine dial...

plus de 2 ans il y a | 5 réponses | 9

5

réponses

Réponse apportée
how does fmincon deal with ill-conditioned problem?
No fmincon don't do anything beside minimizing what feed i. If you provide a function that related to an ill posed inverse probl...

plus de 2 ans il y a | 1

Question


Detect figure or uifigure from the handle?
Simple question: How can I detect if the handle of Type 'figure' corresponds to a figure or uifigure?

plus de 2 ans il y a | 2 réponses | 0

2

réponses

Charger plus