Answered
Taking Mean of Half Values Inside a Cell
I think you're saying that you have a matrix of values inside a cell in a cell array, but if I misunderstood please correct me (...

4 years ago | 0

| accepted

Answered
How do I write a line for adding a text to my plot?
The text function requires x and y values (or x, y, z values). Alternatively, use the title function if you want a title for yo...

4 years ago | 1

Answered
How do I change the number of axis ticks while using 'datetick' (Object Oriented Programming, Creating an Application)
Cool looking app! One strategy is to set the ticks and then use the keepticks flag: xdata=datenum(2020,1:4,1); ydata=rand(1...

4 years ago | 1

| accepted

Answered
Merge more that two tables together
You can nest joins: outerjoin(t3, outerjoin(t1, t2)) Or in a loop, if you have an array of tables: tbls={t1 t2 t3 t4}; tj...

4 years ago | 0

| accepted

Answered
Searching vector for precision values
This is a common error with floating point precision, the numbers are not actually the same: t = 1:1/400:10; d = 5.565; m = f...

4 years ago | 0

| accepted

Answered
How to read data in app.UITable?
Instead of creating a new figure (with the uifigure function) and a new uitable (with the uitable function), just set the Data p...

4 years ago | 0

Answered
I WANT To fix my graphic to increase
Could you just subtract the first value? y1=linspace(0,.5,100); y2=sqrt(linspace(0,1,100))+.5; y3=linspace(-.5,.8,100).^...

4 years ago | 0

Answered
Find the coordinates of a triangle in a mesh
It looks to me like msh.TRIANGLES is referring to indices in msh.POS, which like a reasonable way to describe a mesh. I'd grab ...

4 years ago | 0

| accepted

Answered
replace values in char array if conditions are met
I think your input is a cell array of character vectors: minDNB={'00','15','30','45','00','15', '30','45'} and you want the ...

4 years ago | 0

| accepted

Answered
center axis+labels inside figure
The OuterPosition property gives you the box around the axes that includes the ticks and labels (and title): ax = axes; ax.Out...

4 years ago | 0

Answered
Creating a 3D array from 2D array
You can use the cat command for this: x=rand(121,27); y=rand(121,27); z=rand(121,27); xyz=cat(3,x,y,z); size(xyz) Or y...

4 years ago | 1

| accepted

Answered
Matlab Coding Display Help
Do you mean you would like to see what's in A on each iteration? Here's 4-5 ways depending on how complicated you want it to be ...

4 years ago | 1

Answered
matlab draws a diagram using the stem function and adds other elements to the legend
It looks to me like the inputs you passed to stem have four columns, so you've made 12 Stem objects in your axes. I'm not sure i...

4 years ago | 0

| accepted

Answered
I am not able to open my editor, command page and the tab that has the "run" button
There's a little button that allows you to collapse the toolstrip, if you click on one of the tabs (HOME | PLOTS | ...) the tool...

4 years ago | 1

| accepted

Answered
How do I create a video from an image being rotated?
You're reading in the image, then writing the video frame, then rotating the image. I think you intended to rotate the video bef...

4 years ago | 1

| accepted

Answered
Solve systems of equations graphically
I think you're asking how to plot these two implicit functions: you can do that with fimplicit. To see where they cross, I suppo...

4 years ago | 0

Answered
How can I change all fields in a structure except one?
You could iterate over the fields and copy them each one at a time unless they were the field you wanted to preserve, but I woul...

4 years ago | 0

| accepted

Answered
How to plot specific data from a imported matrix?
You can plot all data with a line plot using plot(data(:,1),data(:,2)) You can plot all data with a scatter plot using scatte...

4 years ago | 0

| accepted

Answered
Fill plot with gradient colors
Here's one way to make the patch with the color gradient: x=linspace(0,4*pi,100); y=cos(x); patch([x flip(x)],[y zeros(size(y...

4 years ago | 2

| accepted

Answered
How to create a loop to sum up the elements in a row array one by one?
You can use the cumsum function for this: a=[1 1 1 1 1]; cumsum(a) If you have a matrix, and you want to take your sums row...

4 years ago | 0

Answered
error using savefig and saveas
I'm not sure why you're seeing this error, if it's due to the file being too large there are a couple of things that you can try...

4 years ago | 1

| accepted

Answered
Downsample for 3 different scales
To use imresize with uneven width and height specify the target number of rows and columns: im=imread('peppers.png'); nr = hei...

4 years ago | 0

Answered
Contour Graph/Plot displays edgy function
It looks like it's getting smaller, but actually MATLAB is just picking 10 (different) linearly space levels. The increased reso...

4 years ago | 1

| accepted

Answered
Problem with plotting with 3 different y axes
Unfortunately there is no plotyyy, nor is there a more-than-2 version of plotyy's succesor yyaxis. You can kind of fake it on...

4 years ago | 0

| accepted

Answered
Find the maximum value of a column in a table
The problem here is that A(:,1) returns a table not the values in the table. You can retrieve the values with A.(1) or A{:,1} bu...

4 years ago | 0

Answered
How to change the order of the legend in the Matlab version 2019b?
With your existing .fig file, grab the line objects and feed them into legend in whatever order you like: open('check.fig') ...

4 years ago | 2

| accepted

Answered
Line segments in a box created with random angles
Is your axis still at the limits you specified at the top? My guess is that refline is changing the limits. Can you just put thi...

4 years ago | 1

| accepted

Answered
How to generate unaligned subplots using tiledlayout?
tiledlayout requires that your grid is fixed, but you can do this in two ways: First approach: least common multiple with tiles...

4 years ago | 1

| accepted

Answered
Saving tiledlayout with imagesc exactly as shown
You mentioned that you tried imwrite, did you use a strategy that combined getframe/imwrite? Something like: im = getframe(fig)...

4 years ago | 0

Answered
How can I create an own callback function associated with several object? Like a 'refreshplot' callback function used in the 'PatientsDisplay.mlapp' app's example of Mathworks
In Code View, when you add the callback, just give them all the same name (see attatched gif)

4 years ago | 0

Load more