답변 있음
How to segment a matrix into N regions with sizes XYZ?
I'm not sure how to do an area-preserving transformation in Matlab See imwarp.

2년 초과 전 | 0

답변 있음
Need help graphing gradient of 2D polynomial
[Gx, Gy] = differentiate( sf, X, Y ); figure; surf(X,Y,Gx); title('X-Gradient') figure; surf(X,Y,Gy); title('Y-Gradient')

2년 초과 전 | 0

답변 있음
I want a Matlab Program for creating a single frame with combined plots of a surface plot of a two-dimensional standing wave field in addition to an image of projection plot
x = linspace(-1, 1, 100); y = linspace(-1, 1, 100); [X, Y] = meshgrid(x, y); frequency = 1; amplitude = 1; Z = amplitude * sin...

2년 초과 전 | 0

| 수락됨

답변 있음
Using lsqcurvefit for parameter optimisation
Since you are just trying to verify the results of a previous paper, initialize with the solution parameters that the paper prov...

2년 초과 전 | 0

답변 있음
returning a unique array and comparing it with a different array.
The whole thing can be done in one line. No need for unique, reshape, or any of the rest of it. result = ismembertol(a,y_cosno...

2년 초과 전 | 0

| 수락됨

답변 있음
Improving performance of parallel code sections
The task is too small for parallelization to have any meaningful effect. Similarly, the relative performance numbers for the dif...

2년 초과 전 | 0

답변 있음
Is it possible to have a line graph with a different marker for each point on the same line?
You can effect that as below. I don't see why you'd want it, however. x = 1:5; y = [2, 3, 1, 4, 2]; xc=num2cell(x); xc{end+...

2년 초과 전 | 1

| 수락됨

답변 있음
Fminsearch does not work after increasing maxiter
The warning is not coming from fminsearch. It is coming from the ODE solver. As fminsearch iteratively explores different choice...

2년 초과 전 | 0

답변 있음
How do I make the fit better so that there are no negative y-values for the fit?
Why use fit() if you just want to interpolate? Why not use interp1 with the 'pchip' method instead? clc; clear all; %% --Va...

2년 초과 전 | 0

| 수락됨

답변 있음
How do I make a secondary Y axis
It is, unfortunately, a very awkward thing to do. The datatip will show y3 with an increment of 200, but there may be ways to cu...

2년 초과 전 | 2

답변 있음
How to get equispaced values with a more exact result than using linspace and column functions?
I want exactly equispaced output There is no such thing as exactly anything in floating point computation. The inaccuracies you...

2년 초과 전 | 1

답변 있음
MATLAB won't run script unless functions are defined in a specific order?
As long as all your functions are placed at the bottom of the script, it shouldn't matter what order they are in.

2년 초과 전 | 0

답변 있음
Sort function indices in regards to the original data?
[val,is] = sort([86.9565 69.5652 65.2174 52.1739 43.4783 65.2174 91.3043 60.8696],'descend'); idx=1:numel(val);...

2년 초과 전 | 2

답변 있음
How to split array into sub arrays?
a = [1 3 5 8 11 12 15 17 18 19 20 21 24 29 31 32 33 34 35 36 38 39]; G=findgroups(discretize(a,[0:10:max(a)+10],'Include','ri...

2년 초과 전 | 0

답변 있음
Cubic interpolation coefficients and basis matrix
Using this FEX downloadable, https://www.mathworks.com/matlabcentral/fileexchange/44669-convert-linear-functions-to-matrix-form...

2년 초과 전 | 0

| 수락됨

답변 있음
Getting points back from convexhull/trisurf, or 'how to find the closest point on a 3d surface to a given point.
This might be what you're looking for, https://www.mathworks.com/matlabcentral/fileexchange/52882-point2trimesh-distance-betwee...

2년 초과 전 | 0

| 수락됨

답변 있음
How to get a smooth boundary between clusters?
Once you've extracted the boundary points, you could use sgolayfilt to smooth them.

2년 초과 전 | 1

답변 있음
Computation of the distance of the points from the interpolation curve?
dist = pdist([flowrate y], 'euclidean','Smallest',1);

2년 초과 전 | 1

답변 있음
Which algorithm does SVD function take?
The SVD algorithm is not disclosed by MathWorks, but even if you could be sure the same algorithms were used by both Matlab and ...

2년 초과 전 | 2

| 수락됨

답변 있음
shade the area between curves
% Define the data as column vectors x1 = [0.001 0.055178 0.06313 0.071457 0.072486 0.089794 0.099338 0.099518 0.107103 0.118855...

2년 초과 전 | 0

질문


How to detect whether a figure is created by uifigure()
I have the following in my startup.m file, set(groot,'defaultFigureCreateFcn',@(fig, ~)addToolbarExplorationButtons(fig)); ...

2년 초과 전 | 답변 수: 2 | 1

2

답변

답변 있음
Can I upload the results of my work with a home license to GitHub?
I don't think any of the licenses restrict your ability to share your code, with the obvious caveat that if you try to sell it ...

2년 초과 전 | 0

답변 있음
For matrix A you cannot do: A.^2(:)
You cannot apply ()-indexing to mathematical expressions, function calls, or literal constants, only to variables. So, in your c...

2년 초과 전 | 1

| 수락됨

답변 있음
Piecewise Function (Toolbox Doesn't Work)
Why bother with symbolic math? Why not just plot as below? n=linspace(-2,5); f = @(n) (3*exp(-n).*sin(pi*n)).*(n>=0); plot(...

2년 초과 전 | 0

| 수락됨

답변 있음
How to add colorbar using image data
I would guess maybe, colormap parula However, we really need to see the corresponding grayscale image to make an informed choi...

2년 초과 전 | 0

답변 있음
How to remove surface segments produced with trisurf (based on delaunyTriangulation)?
You could use faceNormal to find which facet normals are sufficiently aligned with the z axes as to consider them part of the to...

2년 초과 전 | 0

| 수락됨

답변 있음
What is the Distinction Between Answers and Discussions?
Answers is intended for seeking solutions to difficulties encountered by the OP in using Matlab. Discussions is not for solutio...

2년 초과 전 | 2

답변 있음
How can I maximize a tiled layout in a live script?
TL=tiledlayout(3,1); Fig2=TL.Parent;

2년 초과 전 | 0

| 수락됨

답변 있음
Hi, I am plotting surfaces and I want to connect them with interpolation, but I don't know how.
% Define the data as column vectors x1 = [0.001 0.055178 0.06313 0.071457 0.072486 0.089794 0.099338 0.099518 0.107103 0.1188...

2년 초과 전 | 0

| 수락됨

답변 있음
Why does a griddedInterpolant use twice as much memory as the array of values that it's interpolating between?
I suspect that griddedInterpolant does not really consume twice what V consumes. I think it is just a quirk of whos(). Remember ...

2년 초과 전 | 0

| 수락됨

더 보기