Answered
How can I convert one date and time from two colums?
One approach: filename = 'tidal_data_jtide.txt'; TideData = readtable(filename); ...

8 years ago | 1

Answered
how to convert .m file to .txt file in matlab
Your *|.m|*-file _is_ a text file. You can open it in the MATLAB Editor, or any text editor, such as ‘notepad’ in Windows. ...

8 years ago | 0

| accepted

Answered
How to make a matrix into a 3D graphic representation like intensity?
Use the *|surf|* or *|mesh|* functions: figure surf(YourMatrix) grid on If you have vectors describing the units ...

8 years ago | 0

Answered
why is it not graphing my plot? im getting the data but no data points on my graph
*_First_*, you need to call the function correctly, so use the *|‘@’|* operator to create a function handle in your *|ode45|* ca...

8 years ago | 1

| accepted

Answered
Newton's Law of Cooling - ode45
I am not certain what you want to do. You already have the integrated differential equation, so *|ode45|* is likely unnecessary...

8 years ago | 1

| accepted

Answered
How to make space underneath the lines white opaque in 3D plot?
A relatively simple way is to use the *|patch|* function: [xn,yn] = meshgrid(linspace(0,0.5,14),linspace(-15,15,100)); ...

8 years ago | 0

| accepted

Answered
Hello, How can I plot a figure as below? (3d)
I am not certain what you want or what your data actually are. Try this (with your data, not my created data): N = 25...

8 years ago | 1

| accepted

Answered
How can I plot fit for two curves in one graph?
Try this: xv = linspace(min(x), max(x)); b1 = polyfit(x, y1, 4); f1 = polyval(b1, xv); b2 = polyfit(x, y2, 4)...

8 years ago | 0

Answered
Which command returns two paths
Use the <https://www.mathworks.com/help/matlab/ref/delete.html *|delete|*> (link) function with the *_full_* path to the functio...

8 years ago | 0

Answered
Passing extra arguments to `nlinfit` function
Your function must have your parameter vector as the first argument, your independent variable as the second argument, and any a...

8 years ago | 2

| accepted

Answered
convert any decimal number between 1 to 10 by multiplying the number with 10^n.
I wrote a little utility function for my own use a while back to do just that: expstr = @(x) [x*10.^floor(1-log10(abs(x)))...

8 years ago | 0

| accepted

Answered
How to pass constants when solving nonlinear problem using fsolve
See the documentation on <https://www.mathworks.com/help/matlab/math/parameterizing-functions.html *Parameterizing Functions*> (...

8 years ago | 0

Answered
Using variable input to function in plot title
Use *|sprintf|*: str = 'Tahiti'; title(sprintf('Preliminary plot of %s time series', str));

8 years ago | 0

| accepted

Answered
Find all roots of non linear equation
That algorithm will work when the increment in your *|‘x’|* vector is small enough to detect the sign change. The solution ...

8 years ago | 0

Answered
Why are EXIST and DIR unable to find a .mat file on a network location
See if the <https://www.mathworks.com/help/matlab/ref/which.html *|which|*> (link) function will locate it. I always use *|...

8 years ago | 0

Answered
Multiple figures in for loop
I would first concatenate all the (unfortunately numbered) *|‘y#’|* variables into a single matrix: y = cat(3, y1,y2,y3,y4...

8 years ago | 1

| accepted

Answered
How visualize data in matlab
With your data, use the structure field reference with your *|‘ee_moderate’|* table: d = load('ee_moderate.mat'); ee_mo...

8 years ago | 0

| accepted

Answered
How to shader the stability area ?
What region do you want to plot? You appear to have specified a transfer function. Plotting it is straightforward: f...

8 years ago | 0

| accepted

Answered
'syms' and 'gcd' not working in MATLAB 2018a
Your code works for me. Note that I already did the update described in: <https://www.mathworks.com/matlabcentral/answers/3...

8 years ago | 0

| accepted

Answered
not run order syms x
See: <https://www.mathworks.com/matlabcentral/answers/399991-syms-sym-and-mupad-functions-cause-matlab-to-freeze *"syms", "sym",...

8 years ago | 1

Answered
fminunc is not working with symbolic function of more than two variables.
From your problem description, you will need to use the approach described in the *|fminumc|* documentation section on <https://...

8 years ago | 1

Answered
How can i synchronize two signals to compare?
One option is the Signal Processing Toolbox <https://www.mathworks.com/help/signal/ref/alignsignals.html *|alignsignals|*> (link...

8 years ago | 0

Answered
Fit data with dependent parameters
Yours is a linear problem, however the easiest way to estimate the parameters is likely an unconstrained nonlinear solver, such ...

8 years ago | 1

| accepted

Answered
Adjust bar width according to the x values
See: <https://www.mathworks.com/matlabcentral/answers/378667-i-need-to-plot-a-histogram *I need to plot a histogram*> (link). ...

8 years ago | 0

| accepted

Answered
average sections of matrix
I am not certain that I understand the result you want. Try this: M = rand(31, 109); ...

8 years ago | 0

| accepted

Answered
How can i fit a linear line to a scatter plot knowing the intercept?
See if this does what you want: E = rand(500, 2); % Create Data x = E(:,1); ...

8 years ago | 1

| accepted

Answered
Is it possible to use the trapz function to calculate the integrated value for each point of a data set?
I am not certain how you are generating your signal. One option is to use the <https://www.mathworks.com/help/matlab/ref/re...

8 years ago | 0

Answered
How to extrapolate to the point of intersection
This works: use = (x >= 5E-4) & (x <= 3E-3); xuse = x(use); y1use = y1(use); y2use = y2(use); B1 = polyfit...

8 years ago | 1

| accepted

Answered
Formatting anonymous function handle to feed into lsqcurvefit
The problem is likely your coding of *|‘irradiance’|*. The nonlinear parameter estimation functions, such as *|lsqcurvefit|* an...

8 years ago | 0

Answered
FFT from CSV data file
You have several *|NaN|* values in your data the prevent the *|fft|* calculation. Remove them, and the *|fft|* works: [D,...

8 years ago | 0

Load more