Answered
Trying to plot an estimate of a surface with plot3
Use the surf or mesh functions to plot a surface matrix. Try this — f = @(x,a) a(1)*x+a(2); x = [0.558755760368664;0.83525...

4 years ago | 1

| accepted

Answered
how to insert data into matlab
With R2015a use the xlsread function to import the data. Get all of the outputs in case there is column header information that...

4 years ago | 0

Answered
butterworth filter gain higher than zero
The problem is that the plots provided by either fvtool or freqz do not use the scaling factor (‘glow’ here). Plot them separ...

4 years ago | 0

| accepted

Answered
Contour Plot Wrong Colors
I get a slightly different result when I use ‘torquev’ and ‘rpmrangev’ to define the interpolation grids, so that may be the pro...

4 years ago | 0

Answered
the legend is not working properly
My guess is that you have an AMD graphics card, and have not updated the graphics drivers in a while. (This sort of legend prob...

4 years ago | 1

| accepted

Answered
How can I limit the load function?
I am not certain what you want, however one option is to Load List of Variables into Structure Array You can then limit the va...

4 years ago | 0

Answered
How to combine a marker to a line and show in legend?
Insteaqd of using separate line and scatter calls, use plot. Specifically, see LineSpec.

4 years ago | 0

| accepted

Answered
FFT from .csv voltage and current data file
These are not easy files to work with. That is likely the problem. Try this — C1 = readcell('https://www.mathworks.com/mat...

4 years ago | 1

| accepted

Answered
how to import csv file with along with its headers in the matlab?
You don’t say what Release you’re using, however in R2022a the readtable function seems to do exactly what you want — T1 = rea...

4 years ago | 0

| accepted

Answered
Fourier series fit to a periodic function with multiple frequencies
Adding a second function will change the baseline, for example — t = linspace(0, 10, 1000); s = sum((1./[1;3;5]).*sin([1;3;5]...

4 years ago | 0

Answered
Get the data points after smoothening the plot
I am not certain what you are asking. Try this — T1 = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_f...

4 years ago | 0

| accepted

Answered
fft function error while extracting EEG signals in EDF file
According to the edfread documentation, the ‘data’ are the first output, not the second. The assignments should probably be: ...

4 years ago | 1

| accepted

Answered
How to determine an y value at a specific x value?
Since ‘sm1’ is a function of ‘W1’ this is not as straightforward as it might at first appear. v1=0.034; %viskozite yağ için...

4 years ago | 1

| accepted

Answered
Plot is not lined up with the X axis
I am not certain what the problem is. Using plot with only one argument plots the argument with respect to the indices of the a...

4 years ago | 0

| accepted

Answered
using GA including a hybrid function option
In the optimoptions call, the 'HybridFcn' name-value pair must have a function handle to they hybrid function as its value. I...

4 years ago | 0

| accepted

Answered
Plotting sine wave valley to valley
Perhaps something like this — t = linspace(0, 1, 250); freq = 5; s = sin(2*pi*t*freq + 3*pi/2); figure plot(t,s) grid ...

4 years ago | 0

| accepted

Answered
display comma in xlabel
In the NumericRuler Properties documentation see TickLabelFormat to understand how to put the comma thousands separator in the t...

4 years ago | 0

| accepted

Answered
How to retrieve the fit and confidence bounds values, plotted in the graph upon using fitlm function?
That is one of the 'line' objects, however getting the information from it is not straightforward. Itis easier to just use the ...

4 years ago | 1

Answered
Legend command not working when plotting figure
I am surprised that the legend call did not throw an error. It did when I tried to run the code: ElectronEnergy = (1:100:1000...

4 years ago | 0

| accepted

Answered
How to mark labels on sampling points
I have no idea what you want to plot. Try this — T1 = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_f...

4 years ago | 0

Answered
How can I resample data with multiple time column?
One approach — M = [ 19 1 1 0 0 0 1009.4 28.9 71.0 0.0 0.0 0.0 0.0 19 1 1 0 0 30 1009.4 28.8...

4 years ago | 0

| accepted

Answered
How to find x value for a known y in array plot?
Possibly: idx = find(diff(sign(y - 0.8*max(y)))); xvals = x(idx) That should find the closest indices to all of them.

4 years ago | 0

| accepted

Answered
how to connect the upper points of a sine curve by making them a curve?
Use the envelope function (R2015b and later) in the Signal Processint Toolbox. Perhaps: envup = envelope(y); The function ...

4 years ago | 1

| accepted

Answered
Not getting curve in my graph
‘Any ideas?’ Yes. Subscript ‘theta’ and all the argument vectors using the loop index ‘i’ rather than ‘n’. n=100; s=ze...

4 years ago | 1

| accepted

Answered
how to get decimal answers?
If you are using the Symbolic Math Toolbox, use the double function if the expressions do not contain symbolic variables. If th...

4 years ago | 2

| accepted

Answered
Plotting 5 different filled markers on one graph
If you don’t need lines connecting the points, use the scatter function. It has a 'filled' option to automatically fill the mar...

4 years ago | 0

| accepted

Answered
How to read a .dat file containing an ECG signal?
PhysioBank used to be much friendlier than it now is. I have no idea what records you’re interested in, however the easiest w...

4 years ago | 0

| accepted

Answered
Write multiple variables from a function
sw_sats is a 7071x200 array co2_sat is 7071x200 array k_brine is a 1x1500 array Kb is a 1x1500 array That means that ‘Sw’ ...

4 years ago | 0

| accepted

Answered
Change value based on the values of another column
Another approach — v = [-0.00554 -0.00503 -0.00406 -0.00406 -0.00316 -0.00274 -0.00274 0 0 0 0 0 0 0.00233 0.004...

4 years ago | 0

| accepted

Answered
problem in creating plot from for loop
The value of ‘t’ is the last value in the loop, and the intermdiate values of ‘vs’ are not saved, so the result is only one valu...

4 years ago | 1

Load more