how to plot single curve with 2 yaxis align?
Your second plot is not appearing. Starting in r2016a, the recommended way to plot with 2 y-axes is to use yyaxis. = [0.015 ...

8 días ago | 0

matlab online (Unrecognized function or variable 'minFunc'.)
That is not a function created by MathWorks. Make sure you have the file for the function, and that it either exists on your MAT...

8 días ago | 0

| accepted

How to run a loop for variables satifying a specific condition and multiply them by values stored in a matrix?
I recommend you spend some time going through MATLAB Onramp. It's interactive, and you can go at your own pace. Oh, and it's fre...

8 días ago | 0

| accepted

How to reindex values from a vector
index = [4 2 3 1 5]; x=[0.5392 0.7805 0.5867 0.4189 0.9886]; sortedX = x(index) sortedX = 1×5 0.4189 0.7805...

8 días ago | 0

| accepted

How to generate random number in MATLAB
So not truly random, since the values are co-dependent. There is nothing built-in that will do this, so you have to code the log...

8 días ago | 0

How to extract seasonal means?
For those just coming here, you can see additional details and explanation here. You seem to be grouping Jan, Feb and Dec from ...

9 días ago | 0

| accepted

The best way to see what properties a figure has is to open the property inspector. set the RTickLabel property. Make sure yo...

9 días ago | 0

| accepted

How to repshape array to matrix with different length of each row ?
MATLAB has the function reshape, but there are a couple things to be aware of when using it: The number of elements can't chang...

9 días ago | 2

| accepted

I suggest taking some time to go through MATLAB Oramp. It's a great way to familiarize yourself with MATLAB syntax. For example,...

10 días ago | 0

Attempt to execute SCRIPT pdepe as a function:
Your code runs as is for me. Perhaps you have overwritten the pdepe function? Try clearing it by typing clear pdepe Run the co...

10 días ago | 0

| accepted

The spacecraft free-fall math model

10 días ago | 0

Count Peaks in a Graph
Is your signal always this clean? if so, this would work for n=3:length(z) if z(n-1) - z(n-2) > 0 && z(n)-z(n-1) < 0 && z(...

10 días ago | 0

| accepted

app.UIfigure.Visible does not keep the app window on top of all other windows
Try using drawnow with the figure command in your button callbacks (see this post) drawnow; figure(app.UIFigure)

10 días ago | 1

| accepted

How to extract values from a 3-d .mat file?

10 días ago | 0

Customize color map for temperature and precipitation
Do you have to exactly reproduce the results or just something similar? If you notice, the colorbars in the desired output do n...

10 días ago | 0

How to set the x axis on heatmap
You know the problem, you just have to decide what approach you want take. It's easy enough to use indexing to determine the poi...

10 días ago | 0

| accepted

how can I generate a 3d surface object from 3d vertex extracted from a blender .ply?
Does it have to be a ply file? If you can export it as an stl file, the following code might meet your needs. mnky = stlread("m...

11 días ago | 0

How do I plot the value at each iteration?
I shared a simple example in a similar post recently. That might help.

11 días ago | 0

| accepted

How to plot a circle given its equation (with colors)
You could rearrange the equations to be in the form "y=..." and then use fplot on that. y=@(x) sqrt(1/2 - x.^2); fplot(y,'--or...

11 días ago | 0

| accepted

Kinematics while loop is infinite, plus other errors.
Quick observation is that you are not being careful with your units. H is specified as height in km, but it looks like you are c...

12 días ago | 0

how to use ode45 ?
We don't know what odefun or vectorize are, but it doesn't make sense to be using varargin here. Have you tried looking at the d...

12 días ago | 0

How to find out the set of Y values > 0 and corresponding X values?
I recommend first learning about indexing in chapter 5 of MATLAB Onramp, then moving to logical indexing in chapter 12 (task 4 i...

12 días ago | 0

| accepted

How to plot an iteration to run like a simulation while iteration is still ongoing?
You have one too many ends in your code. Not sure at what point you want to plot Best, and against what other variable, so her...

12 días ago | 0

how to plot the time series data with dates showing in x axis
Convert your dates to the datetime data type. Then, when you plot using the datetime, the date will appear on the axis. You can ...

13 días ago | 0

| accepted

How to create plot3 varying color figure?
Short answer - not very easily. See this post.

13 días ago | 0

Removing NaN in Linear Regression Problem. Error in line 66.
Try using rmmissing. It accepts vectors, matrices, cell arrays, tables, and timetables as input.

13 días ago | 0

How to start reading from a specific line in a text file?
What type of text file? Genearlly, you would use fseek to get to the starting point you want, and fgetl to read in your data li...

13 días ago | 0

monthly average of my variables
Recommendations would be to use readtable, add a variable to the table containing the dates as datetimes, and then use groupsumm...

13 días ago | 0