已回答
How does indexing work when sorting a matrix?
For matrix R, sort(R) sorts each column and indsort are row indices. To reproduce the sorted matrix, you can convert those row ...

1 month 前 | 1

已回答
Better way to keep dimensions using reshape from extracted struct array?
load('data.mat') bb = vertcat(myData.data.b)

1 month 前 | 2

| 已接受

已回答
Interpolating between columns for an index
lookup = [ ... 550 750 950; ... 1 2 8; ... ]; data = [ ... 550 22; ... 580 21; ... 650 20; ... ...

1 month 前 | 0

| 已接受

已回答
setting range on colorbar in appliction designer
Replace c.clim ([minval maxval]);% <- causes error with app.UIAxes.CLim = [minval maxval];

1 month 前 | 0

| 已接受

已回答
Hi coders! i'm facing a error. Error using contourf Z must be at least a 2x2 matrix.
d and g are both scalars d = 10; % ... g = 0.085 ; so su is a scalar su = round(4*d/g)+1 ; so r and p are both column ve...

1 month 前 | 0

已回答
Find strings within other strings then pull data from that point
filename = 'P0300.txt'; to_find = '01 3E'; str = fileread(filename); pat = strjoin(repmat({'[\dA-F]{2}'},1,3),' '); C = ...

1 month 前 | 0

| 已接受

已回答
Help to create a continuous surface heatmap
I'm not sure what a 1D surface looks like. If Temperature is in the Y-direction, what variable should be used for the color of ...

1 month 前 | 0

| 已接受

已回答
how to plot contour of 3D variable
Example data: Salinity = rand(744,24,25); [Lat,Lon] = ndgrid(1:24,1:25); whos Lat Lon Salinity If you want a sequence of fil...

1 month 前 | 0

| 已接受

已回答
Transforming long panel data
Here's one way, where the form of resulting table Tnew closely matches the form of the table in the "after" image: T = readtabl...

1 month 前 | 0

| 已接受

已回答
Finding the closest coordinate from a surface plot based on a X, Y location
load slab_strike is_ok = ~isnan(z); [X,Y] = meshgrid(x,y); X = X(is_ok); Y = Y(is_ok); Z = z(is_ok); lon_GMM = -73.529...

2 months 前 | 1

| 已接受

已回答
max value inside a circular region in grided data
% assuming sample data lat = -60:0; lon = 90:160; wind = randi(10, numel(lat), numel(lon)); % forcing max wind of 100m/s a...

2 months 前 | 0

| 已接受

已回答
How can I increase the number of decimal places displayed on app designer UITable?
Maybe some code is modifying the uitable after the startupFcn executes, because the code you've shown should work. Here it is w...

2 months 前 | 2

| 已接受

已回答
Finding NaN and Missing values from a mat cell matrix
load('example_global.mat') C = example_global As you said, the cell array in the attached mat file doesn't have any NaNs, so I...

2 months 前 | 0

| 已接受

已回答
after input values and push preview doesn't display in UIAxes
Looks like you've got an extra PreviewButtonPushed function declaration: % Button pushed function: PreviewButton ...

2 months 前 | 0

已回答
Why i am getting Error using Phase1/UIAxesButtonDown Too many input arguments.
Sim takes 21 input arguments, but you are passing 22. Judging by their names, T_endD is the extra one. So, if T_endD really sho...

2 months 前 | 0

已回答
How to change in marker size in the global legend?
[leg,icons] = legend({'A','B','C'}); leg.Layout.Tile = 'North'; icons1=findobj(icons,'type','patch'); set(icons1,'MarkerSize'...

2 months 前 | 0

| 已接受

已回答
Why do I get Empty Plots during Optimization?
Specifying the OutputFcn rather than the PlotFcn seems to provide something like what was intended. options = optimoptions('ga'...

2 months 前 | 2

| 已接受

已回答
Help Needed: Fixing Indexing Error in MATLAB Random Name Generator Code
I'm not sure what the error is, but you should use curly braces {} to get the contents of a cell in a cell array. function rand...

2 months 前 | 0

已回答
Finding mode of each row in an array of Strings
str = ["Apple" "Banana" "Apple"; "Cherry" "Cherry" "Apple"; "Mango" "Mango" "Mango"] N = size(str,1); modes = strings(N,1); ...

2 months 前 | 0

已回答
How to give range of cells different variable names?
Try replacing this CurrentData = {Datafiles.data}'; TABLE_Pass = table(CurrentData); TABLE = vertcat(TABLE_Pass); with this ...

2 months 前 | 0

已回答
Error using contourf (line 57) The size of X must match the size of Z or the number of columns of Z.
When using contouf(X,Y,Z,_) with vectors X and Y and matrix Z of size m-by-n, the length of X must be n and the length of Y must...

2 months 前 | 0

已回答
add a number of nodes N between two known nodes
NODES = [-41.9153 -20.1597 65.3012; -33.2487 -10.7068 7.4146]; N = 5; t = linspace(0,1,N+2); t([1 end]) = []; NO...

2 months 前 | 0

| 已接受

已回答
Bar chart from Excel with hidden columns
filename = 'Auswertung - Kopie.xlsx'; opts = detectImportOptions(filename); opts = setvartype(opts,2:numel(opts.VariableType...

2 months 前 | 1

| 已接受

已回答
Conversion to double from cell is not possible
Set a breakpoint at that line in your function, and when the breakpoint is triggered, check the class of D. I suspect you'll fin...

2 months 前 | 0

| 已接受

已回答
Patch and fill functions are not shading area between confidence intervals in 2024a
This will work regardless of the orientation of the vectors, i.e., whether each is a row or column vector: patch([Tlower(:); fl...

2 months 前 | 0

| 已接受

已回答
Creation of binary coded image from a matrix
Here's one way, which will work for any non-empty matrix A. A = [0 2; 1 3] B = getB(A); disp(B) A larger example: A = randi...

2 months 前 | 2

| 已接受

已回答
how can i make a parent - children hierarchy
Here's some logic that should do it. Adjust as necessary for your actual file. % an example table that might be similar to what...

2 months 前 | 0

已回答
App designer: Why can't I bring forward my axes in the design?
Any axes will always be beneath any non-axes component (including a uiimage) or panel. See "Reordering Limitations" here: http...

2 months 前 | 1

| 已接受

已回答
Vector field graph from a data file.
readmatrix might be useful to read the file, and quiver might be useful to create the plot.

2 months 前 | 0

| 已接受

已回答
Why did I get duplicate variables in my workspace after changing their names?
To me it seems most likely that at some point you saved the mat files with the Flux (capital F) variables still in your workspac...

2 months 前 | 0

| 已接受

加载更多