Answered
Draw shapes not in a graph
Try something like this: x1 = rand(1,5); y1 = rand(1,5); x2 = rand(1,7); y2 = rand(1,7); figure plot(x1, y1, 'or', 'Mar...

5 dagar ago | 0

Answered
please help me (dsolve)
The single quotation marks are likely the problem. Try this slightly edited version: syms y(t) Dy = diff(y); D2y = diff(...

5 dagar ago | 0

Answered
How Do I Fitting a 3 Unknown Parameter Model?
There are several functions available to estimate the parameters. This uses fminsearch because everyone has it: VFTfcn = @(b,...

6 dagar ago | 0

| accepted

Answered
Matlab interpolation between two surfaces
Experiment with this: x = linspace(-5, 5, 20); y = x; [X,Y] = ndgrid(x,y); z = @(x,y,s,h,a) a .* exp(s*(x.^2+y.^2)) + h; ...

6 dagar ago | 0

Answered
complementary error function (surf plot)
Add: [X,T] = ndgrid(x,t); and it works: x = linspace(0,10^(-6),20); t = linspace(0,5,5); [X,T] = ndgrid(x,t); u0 = 10^(-...

6 dagar ago | 0

| accepted

Answered
Solving equations using Laplace transform
Unless you are solving a partial differential equation, such that the Laplace transform produces an ordinary differential equati...

7 dagar ago | 0

| accepted

Answered
Answers editor seems to be broken
The website was updated. I had the same problem, and it turned out that Rena’s suggestion that clearing the Firefox cache solve...

7 dagar ago | 0

| accepted

Answered
Error using atan2 Inputs must be real.
If you want to compute the phase angle of a complex number, use the angle function.

7 dagar ago | 0

| accepted

Answered
How to get unknown number of variables to be all same length through interpolation
Try this approach: V1 = sort(rand(1,5)); % Original Vector V2 = sort(rand(1,10)...

7 dagar ago | 0

Answered
ode15s error(Genetic algorithm for differential equation parameter identification)
I cannot follow your code. See Ode system solution with unknown constant for one example of an approach that generally works....

7 dagar ago | 0

Answered
Chi-squared for multiple groups
Consider Perform One-Way ANOVA instead.

7 dagar ago | 0

Answered
ODE with time-varying coefficients
The Answers Comment and Answer windows are malfunctioning. I am having serious problems with the lack of formatting and other o...

7 dagar ago | 0

| accepted

Answered
designing a chebyshev type 2 high pass filter
Start with the cheb2ord function to define all the variables appropriately.

8 dagar ago | 0

| accepted

Answered
Differential eq of a hot storage tank
The time intervals the ODE solvers use are whatever you define them to be, since they have no inherent unit. In the ‘m’ assignm...

8 dagar ago | 0

Answered
Output numeric array from symbolic evaluation
After the loops: T = vpa(T) creates the entire array as decimal fractions.

8 dagar ago | 0

| accepted

Answered
How can I draw the fitted curve and find the initial slope of the attached plot?
Try this: D = readmatrix('Example.xlsx'); x = D(:,1); y = D(:,2); p = polyfit(x, y, 3); yfit = polyval(p, x); dp = poly...

8 dagar ago | 0

| accepted

Answered
Mathematical Modelling for parametric analysis
See the documentation for regress to understand how to work with the ‘carsmall.mat’ file. You should have it, since it’s been...

8 dagar ago | 0

| accepted

Answered
Invalid indexing for dsolve
The equations are nonlinear, and for most nonlinear differential equations, an analytic solution does not exist. Try this ins...

9 dagar ago | 0

Answered
How to extract numbers from .dat file
One option: fidi = fopen('Nasis Vangelis.dat','rt'); k = 1; while ~feof(fidi) readline = fgetl(fidi); C{k} = regex...

9 dagar ago | 0

Answered
How to Plot a Continues Tiime Signal
I have no idea what ‘x(t)’ is. I usually code the uint step function as: u = @(t) t>=1; althoug other options are possible...

9 dagar ago | 0

Answered
read data from delimited text file
This is one of the more difficult files I have managed to import! See if this does what you want: fidi = fopen('water.txt')...

9 dagar ago | 0

| accepted

Answered
A simple LowPass Filter
Using a window inplies a FIR filter. Start with the fir1 function to design it, and freqz to analyse it. Filter your signal wi...

10 dagar ago | 0

Answered
Printing my Integration step by step
Use cumtrapz instead of trapz: L=F./W; lambda= 2*cumtrapz(W,L) figure plot(W, lambda) grid xlabel('W') ylabel('\int\la...

11 dagar ago | 0

| accepted

Answered
Cell-Matrix, I can't extract values
Change the code slightly to: F = openfig('phi_1.fig'); ax = gca; lines = findobj(ax, 'Type','Line'); for k = 1:numel(lines)...

11 dagar ago | 0

| accepted

Answered
Mesh with griddata, how eliminate undesidered extra surface
Without your data, posting an exact solution (if one even exists) is not possible. One possibility is that your data are actu...

11 dagar ago | 1

Answered
why surface plot is connecting its edges?
Try this for the file provided, and the others that likely have similar formats. Note — It is only necessary to reshape the ...

11 dagar ago | 0

| accepted

Answered
Help finding R^2 value for curves
I appreciate your quoting my code! The value is not difficult to calculate. One example using a much simpler single-var...

11 dagar ago | 0

| accepted

Answered
Predicting the kinetic constant of a reaction based on experimental data
If you have the Global Optimization Toolbox, the code I attached will estimate the parameters with reasonable accuracy, although...

12 dagar ago | 0

| accepted

Answered
Trouble with my function
You need to tell your ‘derivative’ function what ‘y’ is. Changing ‘derivative’ to an anonymous function (for my convenience) ...

12 dagar ago | 0

Answered
Error using plot3 - Vectors must be the same length
See if this does what you want: theta = [0:0.101:pi/2,3*pi/2:0.01:2*pi]; rho = sqrt(cos(theta)); [x,y]=pol2cart(theta,rho); ...

12 dagar ago | 0

| accepted

Load more