Beantwortet
What is the best way to check the inputs of a function?
I'm sure there are varying opinions on this. Here are some bits that might help with your decision. function argument validat...

etwa 3 Jahre vor | 1

| akzeptiert

Beantwortet
prompt a GUI user to enter different values
Put your dialog in a while-loop that exits when the input conditions are met and regenerates the dialog if the conditions are no...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to extract specific dates from a datetime table?
Datetimes are rounded down to the start of the day using dateshift. Then, ismember finds matches between the two sets of dates....

etwa 3 Jahre vor | 1

Beantwortet
How to avoid horizontal shifts after applying GroupByColor on boxcharts?
You can create the boxes in a loop, y = magic(5); [nrows, ncols] = size(y); hold on for i = 1:ncols boxchart(repel...

etwa 3 Jahre vor | 1

Beantwortet
Deleting axes changes legend transparency?
In gplotmatrix, the legend is associated with the axes in the upper right corner. When the visibility of that axes is off, the ...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
How can I change the font size in the command window for the mode -nodesktop?
Changing the fontsize of the command window programmatically via settings has no effect in -nodesktop. However, starting in R...

etwa 3 Jahre vor | 0

Beantwortet
How to align the figure name to the left ?
Starting in MATLAB R2020b, control the horizontal alignment of title and subtitle using the axis properties TitleHorizontalAlign...

etwa 3 Jahre vor | 3

Beantwortet
Display images instead of numbers in a Matrix.
Here are some solutions using emojis. One emoji, different colors emoji = char([55356 57312]); % "🏠" data = [0 1 0; 1 1 1...

etwa 3 Jahre vor | 0

Beantwortet
How to solve the problem that the hybrid algorithm in mixed integer programming is ignored
As per the documentation (see this page), there are some restrictions on the types of problems that ga can solve when you includ...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
What is the meaning of x=x(:).'?
This ensures x is a row vector. It is useful when you are unsure of the size or shape of an input but you need it to be a row...

etwa 3 Jahre vor | 1

Beantwortet
compare variable with different data types
Detect if x is a string or character array Validate the string and convert it to a logical where yes==true Use a conditional s...

etwa 3 Jahre vor | 0

Beantwortet
Can you create frames in Figure?
This demo uses uigridlayout and uipanel to create 4 panels. Using tiledlayout, it creates 4 axes within each panel. You can se...

etwa 3 Jahre vor | 1

| akzeptiert

Beantwortet
uiprogressdlg does not broadcast PostSet
> Is this a bug or did I just do something wrong? You aren't doing anything wrong. There's a difference in how the CancelReque...

etwa 3 Jahre vor | 0

Beantwortet
How to plot multiple y-axis with data points on the axis
See parallelplot h = parallelplot(rand(3,4));

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
The stop button doesn't terminate the process when pressed.
Looks like status2 = handles.stopval should be status2 = handles.stopval.Value;

etwa 3 Jahre vor | 0

Beantwortet
transparency issue using "plot" function
Applying transparency to line objects is not documented and leads to issues in some circumstances (e.g. live scripts and loading...

etwa 3 Jahre vor | 0

Beantwortet
Plot with the same Y-axis on both sides
You can use yyaxis but you need to link the left and right y rulers so when one changes, the other updates. This comes in handy...

etwa 3 Jahre vor | 3

Beantwortet
How can I put images in a table using gui?
Here's a demo that embeds images in cells of a uitable but as @Walter Roberson mentioned, the image size will be small, and the ...

etwa 3 Jahre vor | 4

| akzeptiert

Beantwortet
Adjust the axis of bar3 plot
Use this syntax to specify y-coordinates: bar3(y,z) z = rand(4,20); y = [30 35 40 50]; bar3(y,z) ylabel('y axis')

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
Can i convert subplots in tiledlayouts?
See tiledlayout to learn about layout options and spacing. See nexttile to learn about setting the tile location and span. ...

etwa 3 Jahre vor | 0

| akzeptiert

Beantwortet
No transparency in Livescript
The RGBA color definition for lines is undocumented and does not work with MLX files. The line transparency also will not appea...

etwa 3 Jahre vor | 3

Beantwortet
Increase figure size in livescript
One way to change the figure size in a live script is to set the figure's width and height. fig = figure(); fig.Position(3:4)...

etwa 3 Jahre vor | 1

Beantwortet
Create a diagonal matrix with a for loop from a vector
Here are three way to define a diagonal in a square matrix of zeros that do not require a loop. eye() ML = rand([5 1]) Mout ...

etwa 3 Jahre vor | 0

Beantwortet
how to plot using the slice function the last row and column of a 3 matrix?
The syntax slice(V,xslice,yslice,zslice) plots surface using the vertex data in V at slices specifed by the 2nd, 3rd, and 4th ar...

etwa 3 Jahre vor | 0

Beantwortet
Transformation from datetime to seconds
> I wanna do a transformation from datetime dd:MM:yyyy hh:mm:ss to seconds from a table See a table of format identifies in the...

etwa 3 Jahre vor | 0

Beantwortet
Axes in dialog box turn blank after calling imagesc in pushbutton callback
TL;DR This issues has been fixed in R2025a. Prior to R2025a, fix it by specifying the number of colors in jet() function BtnP...

etwa 3 Jahre vor | 2

Beantwortet
How do you plot two graphs with multiple curves next to a table?
Create a uigridlayout and put a uitable in it using the Layout property of uitable. To add the axes in the demo below, I added ...

etwa 3 Jahre vor | 2

| akzeptiert

Beantwortet
How can I change the color of tiles in a spherical graph?
sphere sphere axis equal colorbar If you want to change the colors, you can plot the sphere using surf(X,Y,Z,C) where C cont...

etwa 3 Jahre vor | 0

Beantwortet
add error for when input is not integer
> I want to add an error message for when the input is not an integer This returns true when the value is an interger mod(value...

etwa 3 Jahre vor | 0

Beantwortet
How can i change color of a specific bin using histogram2 or anything similar
One way to do this is to plot a histogram for each group. rng('default') % For reproducibility of this example x = 100*randn(...

etwa 3 Jahre vor | 0

| akzeptiert

Mehr laden