Beantwortet
How to get scale and coordinates from quiver function?
> the particles have new locations [X1, Y1]. Is there a way to get this new location data? If you already have the X, Y, U and...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
My function won't accept the vector
Perhaps you're looking for x = 0:1:10; f = x.^2-x-1;

mehr als 3 Jahre vor | 1

Beantwortet
Detect when UIfigure is open
MATLAB currently does not return an indication that rendering is complete but you could use a MATLAB function that requires rend...

mehr als 3 Jahre vor | 0

Beantwortet
Value of cross correlation in matlab?
You could compute the cross correlation at 0 lag using r = xcorr(___,scaleopt) where scaleopt can be set to a normalization opti...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
Export figure using print with variable as the file name
Use exportgraphics (or another function export function, if needed) and define the filename using sprintf. Example: fig = fi...

mehr als 3 Jahre vor | 2

| akzeptiert

Beantwortet
Error converting string into cell array
> Sources is an image, however I just need the name of it stored in the matrix Assuming sources is a string or character vecto...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How to create a matrix whose elements are a function of previous elements
This solution has two "inputs", initialMatrix and nRows and produces the output matrix out which has the same number of rows spe...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How do I change a string object into a variable name that heatmap accepts
If nchoosek returns a cell array of strings, you can index them using { } try this. heatmap(engine_config, group_perms{i,1}, g...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Overlay some line plots selectively from different .fig files in Matlab?
> Is there a better way to merge plots systematically? The color of the lines and markers in your plots were intentionally set ...

mehr als 3 Jahre vor | 2

| akzeptiert

Beantwortet
How to set the number of digits in a .txt file?
If you're using these values as numeric values, then you don't need the leading 0 since 056 is the same as 56. If you're usin...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Find the percentage of area occupied by an object
Assuming that this is an image and that the pink color is a single RGB color value, you could compute the number of pixels with ...

mehr als 3 Jahre vor | 1

Beantwortet
block plotting a figure
This is a common problem which often arises from functions that produce sanity-check visualizations or other windows to underlyi...

mehr als 3 Jahre vor | 1

Beantwortet
Shutdown at specific time
This solution displays a confirmation dialog that indicates to users that MATLAB will close unless they decide to cancel the aut...

mehr als 3 Jahre vor | 0

Beantwortet
Change the position of a pie chart
The solution below rotates the set of objects that create a pie chart by using an hgtransform. The text label alignment needs...

mehr als 3 Jahre vor | 0

Beantwortet
Undefined function 'imsegkmeans' for input arguments of type 'uint8'.
imsegkmeans accepts uint8 values which means either You don't have the image processing Toolbox, or You are using a MATLAB re...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Cell entries as the third dimension of the cell2mat matrix.
Compute B outside of the loop for k=1:N for j=1:N A{k,j}=S(:,j).*D(k,:).'; end end B = permute(reshape(hor...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Disable help tips in app designer
Setting preferences to control suggestions and completions From the MATLAB Environment, go to the Home tab, and open Preferen...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Pop-ups don't appear when starting from AppDesigner
After reducing your startup function to the following, I could not reproduce the results in MATLAB R2022a. function startup(a...

mehr als 3 Jahre vor | 0

Beantwortet
Histogram (with sum of variables on y-axis)
Hello Vlatko, I'm not sure if you want to sum the two vectors and then compute the binned sum or if you want to compute the bi...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
How can convert line plot to bar plot
It appears you're looking for bar(x) or bar(x.') depending on how you'd like to group the bars.

mehr als 3 Jahre vor | 0

Beantwortet
I want to take a training in matlab
Here are free tutorials to start learning MATLAB or Simulink. Select the "MATLAB Onramp" to get started with MATLAB. https://...

mehr als 3 Jahre vor | 0

Beantwortet
colored isosurface could not be maintained
Why do the isosurface colors change when adding another surface object? By default, the range of colors in the axes' colormap i...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Toggle grid on off when user selects in a GUI
Great question. The funcion gca gets the current axes which is the axes most recently in focus. Instead, you want to specify w...

mehr als 3 Jahre vor | 1

Beantwortet
Find the number of non-empty cells in each row of a cell array
Here's a demo that creates a cell array of tables and empty cells determines which cells contain a table counts the number o...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
Making a heat map from three vectors of different lengths
In heatmap, XData define the number of columns and YData define the number of rows. Your matrix y is 21x10 meaning there will b...

mehr als 3 Jahre vor | 0

| akzeptiert

Beantwortet
Heatmap doesnt show empty rows or columns
By empty I assume you mean that there are NaN values present and I see that you are setting a missing data value color and label...

mehr als 3 Jahre vor | 0

Beantwortet
Plotting Row and Columns
There are important items to address here. 1. Creating new figures if mod(n,10) == 0 %checks whether Remainder after divisio...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
How can I show the legend to all bars?
Your bar() command specifies "stacked" but since your data only defines one level per bar, "stacked" should be removed. This d...

mehr als 3 Jahre vor | 0

Beantwortet
AppDesigner / GUIDE: generate unknown number of new GUI elements as a function
Your quesiton specifies AppDesigner and GUIDE but don't use GUIDE since it will be removed in a future release. Yes, you can pr...

mehr als 3 Jahre vor | 1

| akzeptiert

Beantwortet
Sorting of column 'folder' present in 'struct'
Sounds like you want natural order sorting. There are some File Exchange submissions that do this (example). But if the forma...

mehr als 3 Jahre vor | 0

| akzeptiert

Mehr laden