Answered
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

Answered
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

Answered
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

Answered
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

Answered
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

Answered
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

Answered
Adjusting properties of polar histogram
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

Answered
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

Answered
Loading data into an array
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

Answered
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

Answered
The spacecraft free-fall math model
Another student in the class has asked several questions about this problem as well. Perhaps take a look at the comments in thes...

10 días ago | 0

Answered
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

Answered
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

Answered
How to extract values from a 3-d .mat file?
Your mat file contains variables. Loading the mat file loads the variables back into the workspace. load summean.mat If there ...

10 días ago | 0

Answered
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

Answered
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

Answered
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

Answered
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

Answered
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

Answered
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

Answered
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

Answered
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

Answered
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

Answered
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

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

13 días ago | 0

Answered
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

Answered
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

Answered
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

Answered
Loop in SPM batch not working
The issue I see is that you are trying to combine text and numbers using a function that is expecting all text. As you've observ...

13 días ago | 0

Answered
How can I get fixed output in ode45
Use the following calling syntax instead. This results in a value in y corresponding to each time point specified in tspan. tsp...

13 días ago | 0

Load more