Answered
Heat map from csv data
It looks like a surf plot viewed from the top. Try this — T1 = readtable('https://www.mathworks.com/matlabcentral/answers/u...

4 years ago | 1

| accepted

Answered
Shade area between two lines on a plot - max., and min., values
It would help to have the data. This is straightforward using the patch function — x = linspace(0, 110).'; ...

4 years ago | 1

| accepted

Answered
Convert a time string to double
I am not certain what you are doing, however the isbetween function (that does not require conversion out of datetime) may be wh...

4 years ago | 0

Answered
fprintf use with error
It looks as though you want to print a percent (%) sign. Try this — fileID = 1; ...

4 years ago | 1

| accepted

Answered
How can I apply filer for three signal using matlab
If they all have the same sampling frequency and are the same lengths and the same filtering requirements, concatenate them as c...

4 years ago | 0

Answered
How to display interval data on x axis in histogram plot (eg. 10-20, 20-30,...) ?
Try this — x_ax_data = ["10-20", "30-40", "50-60", "70-80", "90-100"]; % Create String Vector y_ax_data = [0, 0, 200, 550...

4 years ago | 1

Answered
I have problem in solving ode45
The principal problem appears to be having 2 differential equations and 1 initial condition. Try this — w=2*pi; zeta=0.25;...

4 years ago | 0

| accepted

Answered
How to build up linear functions in MATLAB and plot the?
The lilnes are easy enough to plot — xm = [0 0.04999; 0.05 0.24999; 0.25 0.6]; ym = [0 0.25; 0.3 0.55; 0.6 1]; for k = 1:s...

4 years ago | 1

Answered
Get the filename of a loaded file
Save the fille name as a string or character array first, then refer to it as any other variable — filename = '\Data_record_fi...

4 years ago | 1

| accepted

Answered
How to plot this function
Force the NaN value at (0,0) to be 0 — [X,Y] = ndgrid(linspace(-5,5,50)); Z = (X.^3.*Y - X.*Y.^3)./(X.^2+Y.^2); Z(isnan(Z)) ...

4 years ago | 1

| accepted

Answered
How to read excel data include specific word? cell?
Try this — T1 = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1085430/kpmarch.xlsx') Lv = ismem...

4 years ago | 0

| accepted

Answered
Basic 2D-contour plot
One optiono is to use the first column and first row as the appropriate coordinate vectors, and then the rest of the matrix as t...

4 years ago | 1

Answered
Filtering Data which not function of time
The data being filtered do not have to be functions of time. They can be functions of anything, so long as the sampling interva...

4 years ago | 0

| accepted

Answered
Operator '.^' is not supported for operands of type 'cell'
The original problem was caused by using curly brackets {} around the 4: A=(-(vss.*c.^2)./(ks.^2))+((Vs.*K.*gamma.^2.*ct.^2)./...

4 years ago | 0

| accepted

Answered
how to fit an exponential curve to my signal in a plot?
It would help to have the signal. There appears to be high-frequency noise, so the first step would be to calculate the one-si...

4 years ago | 1

Answered
plotting X and Y coordinates over time
The data were not supplied, however it quite probably works correctly. You are asking it to do a linear interpolation, probably...

4 years ago | 0

Answered
how can I solve this problem
I have no idea what you want, especially with two expressions for ‘sm’ and several variables undefined, so taking a wild guess —...

4 years ago | 1

| accepted

Answered
Exponential curve fitting with nonlinearleastsquares methood
Use a different vector for ‘StartPoint’ and then experiment — Xk = [800; 1000; 1490; 2000; 2510]; Yk = [590; 720; 970; 1190...

4 years ago | 0

Answered
How to make error bars on double bar graph?
I have no idea when XEndPoints and YEndPoints was introduced, however it was relatively recently (within the last few years). ...

4 years ago | 0

| accepted

Answered
Best Text/number location on the plot
One approach is to use the legend position after using the 'Location','best' name-value pair, and then interpolating the relativ...

4 years ago | 0

| accepted

Answered
How to customize a colormap?
Another option — cm = colormap(turbo(6)); cm = colormap(flipud(turbo(6))); % Optional cb ...

4 years ago | 0

| accepted

Answered
exctract data from 50 curves in .fig
The argument to openfig should be a single .fig file, so supply the appropriate information for ‘filename’ here. Other than t...

4 years ago | 0

| accepted

Answered
Looking for a way to copy an IGOR Pro function in MatLab
You can do something similar with something like this (that I have turned into a funciton) — x = linspace(0, 10*pi, 250); y =...

4 years ago | 1

| accepted

Answered
How can I remove harmonics from my spectrogram?
If you know the frequency of the fundamental (that is what I assume you are referring to), use the bandpass function on the time...

4 years ago | 0

Answered
How to find the maximum value of C that corresponds to a set of X,Y coordinates?
The spectrogram plot is actually a surf plot with the view set to display it looking from the top, so the ‘Z’ values will give y...

4 years ago | 1

| accepted

Answered
How do I convert a specific string to a date ?
Note the Comment by @Stephen23. That aside, try this— DT = datetime('22-07-04T013:09:42Z', 'InputFormat','dd-MM-yy''T''HHH:...

4 years ago | 0

| accepted

Answered
Interpolation for x,y,z values
The data in the file do not appear to resemble the data in the image. For those, the fillmissing function (R2016b and later r...

4 years ago | 0

| accepted

Answered
Plot 2D surf from 3 columns (X, Y, Data)
Try something like this — Tmag = readtable('FileName', 'VariableNamingRule','preserve'); x = Tmag{:,1}; y = Tmag{:,2}; z = ...

4 years ago | 1

Answered
How to extract a value/s from a matrix that match with specific rows
One possibility is to use the findgroups function to select the appropriate rows, then use that to index into the data. type ...

4 years ago | 0

| accepted

Answered
Does the initial population matrix have to satisfy constraints genetic algorithm matlab
The initial population matrix does not have to satisfy the constraints. Subsequent generations will, at least in my experienc...

4 years ago | 0

Load more