Answered
Mesh and Contour not plotting correctly
I slightly changed your code to make it a bit less confusing (creating ‘x’ and ‘y’ and ‘X’ and ‘Y’): x = -10:0.1:10; y = -10:...

6 years ago | 0

Answered
How do you substitute multiple variable in to an equation??
Symbolic functions are possible beginning with R2012a (if I remember correctly). This should do what you want: syms x y ...

6 years ago | 0

Answered
Please help me understand how to fix this
The function handle is apparently causing the problem, since ‘f’ as a function is being returned, not the evaluation of ‘f’ . ...

6 years ago | 0

Answered
int() commant doesn't work for me
When I try to run the code you poisted, I get: Unrecognized function or variable 'bt'. Error in ... k_2=I0/(C*bt); So whi...

6 years ago | 0

Answered
Help importing specific column of csv file?
Wuth xlsread, specify the range using the syntax in the Xlrange section of the xlsread documentation section. The readmatrix ...

6 years ago | 0

Answered
lsqcurvefit error: Function value and YDATA sizes are not equal.
One possibility is that the output of ‘p32’ is a single value, that being the last value of ‘J’ since it was not subscripted in ...

6 years ago | 0

| accepted

Answered
How to specify date ticks on plot
Try this: TCu = readtable('copper-prices-historical-chart-data.csv'); startlim = '07-Jan-2000'; endlim = '31-Mar-2020'; G...

6 years ago | 3

| accepted

Answered
How can I write a function that draws a regular polygon with n sides in a cartesian plot?
Easily, actually. N = 5; % Number Of Sides a = linspace(0, 2*pi, N+1); ...

6 years ago | 0

Answered
Tangent line of a parametric curve
The function you have and the result you want are not obvious. Try this: t = linspace(0, 2*pi); ...

6 years ago | 1

| accepted

Answered
How can I improve this plot?
That looks like something the envelope function would return.

6 years ago | 0

| accepted

Answered
Plotting a saddle at given points?
‘I attempted to use fplot and since my function has x and y (two variables ) it didnt work.’ Use fsurf instead.

6 years ago | 0

Answered
nothing appears with this code
Use vpaintegral instead of int: syms t; x(t) = sin(3*t^2)*(12*t + (10*13^(1/2))/13); y(t) = t*(6*13^(1/2)*t + 5); z(t) = co...

6 years ago | 0

| accepted

Answered
Zero Padding the center of data
There is already a function to do this. See interpft for details.

6 years ago | 0

| accepted

Answered
Creating an icon for Matlab
In Windows 10, open File Manager (it should be on the toolstrip at the bottom left of the main window) then successively left-cl...

6 years ago | 0

Answered
convert string into number in table
I am not certain what you intend by ‘numbers’, so guessing: D = load('TargetSet.mat'); TargetSet = D.TargetSet; ActivityCode...

6 years ago | 0

| accepted

Answered
Differential Equations ODE1
Go here: Solving ODEs in MATLAB, 1: Euler, ODE1 It’s a totorial by Prof. Dr. Cleve Moler. It has the same calling syntax as th...

6 years ago | 0

Answered
How to divide the curve into two sections and then fit straight line for both sections separately and get intersection of the lines?
And of course — T1 = readtable('combined_data.xlsx'); A = str2double(table2array(T1(2:end,:))); figure Cm = lines(fix(siz...

6 years ago | 1

Answered
How to average in rows of two numbers
If I understand correctly what you want to do, this will work: D = load('AI_Aorta.mat'); x = D.x; idx = hankel(1:4, 4:numel(...

6 years ago | 0

| accepted

Answered
plotting graph straight line
x = 4; y=x^2+5; figure yline(y)

6 years ago | 1

Answered
Regression design matrix is rank deficient to within machine precision. How do I interpret this error?
It means that at least one of the columns in the design matrix is close to being all zeros. Without knowing more, one way to ...

6 years ago | 4

| accepted

Answered
How to integrate a signal sawtooth?
Try this: fs = 1000; kf=1000; t = 0:1/fs:2; signal = @(tt) sawtooth(pi*2*tt+pi); theta=zeros(size(t)); for i = 1:numel(t)...

6 years ago | 1

| accepted

Answered
How to find relationship between two variables ?
First, plot them. That will give you a good idea of how they are related. Second, is there a known process that produced out...

6 years ago | 1

Answered
How to seperate positve and negative x axis
Try this: F = openfig('Bild_versch.fig'); Lines = findobj(F, 'Type','Line'); X = Lines.XData; Y = Lines.YData; LM = X > 0;...

6 years ago | 0

| accepted

Answered
Derivatives of graph from points
To calculate derivatives of a vector or matrix, use the gradient function: Position = [0 0.5 1 2 3 4 5 6 7 8 9 9.5 10]; % in c...

6 years ago | 0

Answered
Unable to filter out a square wave signal using Butterworth filter
There are some significant errors in the code. To begin with, if you want to use a digital filter, it is necessary to design a ...

6 years ago | 0

Answered
solving double equation with random data with regress
See my Answer to your closely related Question.

6 years ago | 0

Answered
regress with vectors arguments
‘Why B size is 2X1 but R is 10 values’ As I understand your Question, it is because ‘B’ is a (coefficient) vector of paramete...

6 years ago | 0

Answered
ODE45 Code Issue
Four differential equations require four initial conditions. [T,X] = ode45(@(t,x) ode45for3B(t,x), [0,10], [0,0]); ...

6 years ago | 0

Answered
I assigned different colors to my plots but they're all the same color
Try this: fun = @(t,x,m,k,c) [x(2); (-c/m)*x(2)-(k/m)*x(1)]; % %% Givens m=2; %kg k=200; %N/m x0=0.05; %meters x_dot=2;...

6 years ago | 0

Answered
How to Calculate Vertical Wavelength
This should get you started: D = load('Signal.txt'); dt = 0.02; L = size(D,1); t = linspace(0, 1, L)*dt; Fs = 1/dt; Fn = ...

6 years ago | 1

| accepted

Load more