I write MATLAB Math documentation

Answered

what's the difference in accuracy between solving a stiff problem by ode15s and ode45?

Stiffness is more of an issue of stability than accuracy. Nonstiff solvers can solve stiff problems, it just takes them a long t...

what's the difference in accuracy between solving a stiff problem by ode15s and ode45?

Stiffness is more of an issue of stability than accuracy. Nonstiff solvers can solve stiff problems, it just takes them a long t...

26 giorni ago | 0

Answered

Change font size of node name in a graph

Several new properties were added to GraphPlot objects in R2018b to enable customization of node and edge labels. In particular ...

Change font size of node name in a graph

Several new properties were added to GraphPlot objects in R2018b to enable customization of node and edge labels. In particular ...

circa un mese ago | 1

| accepted

Answered

Problems with pdepe with disconnected variables in c, f and s

c, f, and s are expected to be column vectors with length equal to the number of equations being solved. Since you have 1 equati...

Problems with pdepe with disconnected variables in c, f and s

c, f, and s are expected to be column vectors with length equal to the number of equations being solved. Since you have 1 equati...

circa 2 mesi ago | 1

| accepted

Answered

Implementing boundary condition in pdepe

The form for the boundary conditions expected by the solver is Since you have a system of two equations, each p and q should ...

Implementing boundary condition in pdepe

The form for the boundary conditions expected by the solver is Since you have a system of two equations, each p and q should ...

2 mesi ago | 0

Answered

pdepe help! (boundry condition in PDE solver)

Your boundary condition function includes the line pl = ul-TT(i); TT(i) is not defined within view of the function, so that i...

pdepe help! (boundry condition in PDE solver)

Your boundary condition function includes the line pl = ul-TT(i); TT(i) is not defined within view of the function, so that i...

2 mesi ago | 1

| accepted

Submitted

Plotting the Binomial Coefficient

Live script that plots the binomial coefficient over all positive and negative argument combos.

2 mesi ago | 0 downloads |

Solved

Project Euler: Problem 2, Sum of even Fibonacci

Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 te...

7 mesi ago

Solved

Triangle sequence

A sequence of triangles is constructed in the following way: 1) the first triangle is Pythagoras' 3-4-5 triangle 2) the s...

7 mesi ago

Solved

Find a Pythagorean triple

Given four different positive numbers, a, b, c and d, provided in increasing order: a < b < c < d, find if any three of them com...

7 mesi ago

Answered

'Undefined Function or Variable' Error when Function is Defined

Looks like the issue is you define cp in the workspace and the function can't access that variable when it gets called. So, try ...

'Undefined Function or Variable' Error when Function is Defined

Looks like the issue is you define cp in the workspace and the function can't access that variable when it gets called. So, try ...

oltre un anno ago | 0

| accepted

Answered

Use griddata ignoring gaps in data

To interpolate without the gaps you need to remove them from the data before interpolating, request values on the full grid (inc...

Use griddata ignoring gaps in data

To interpolate without the gaps you need to remove them from the data before interpolating, request values on the full grid (inc...

oltre un anno ago | 1

| accepted

Answered

system of 1st and 2nd order differential equations ode45

The documentation explains how to express higher-order equations as first-order equations: <https://www.mathworks.com/help/matl...

system of 1st and 2nd order differential equations ode45

The documentation explains how to express higher-order equations as first-order equations: <https://www.mathworks.com/help/matl...

oltre un anno ago | 0

Answered

Solving coupled differential equations

The immediate problem is that you provide too many output arguments to ode45. The components of y will be returned as columns if...

Solving coupled differential equations

The immediate problem is that you provide too many output arguments to ode45. The components of y will be returned as columns if...

oltre un anno ago | 0

| accepted

Answered

Commands related to big data and tall array to annalyze data from .csv files.

Check out the documentation: <http://www.mathworks.com/help/matlab/tall-arrays.html Tall Arrays> The general procedure is tha...

Commands related to big data and tall array to annalyze data from .csv files.

Check out the documentation: <http://www.mathworks.com/help/matlab/tall-arrays.html Tall Arrays> The general procedure is tha...

oltre un anno ago | 2

| accepted

Answered

2nd order numerical differential equation system solving

Use the Symbolic Math Toolbox function <http://www.mathworks.com/help/symbolic/odefunction.html |odeFunction|> to convert the |o...

2nd order numerical differential equation system solving

Use the Symbolic Math Toolbox function <http://www.mathworks.com/help/symbolic/odefunction.html |odeFunction|> to convert the |o...

oltre un anno ago | 0

Answered

I am looking for a way to share the output of my event function with the main function used by the ode solver.

If you specify a terminal event in the event function, then the integration will halt when the event occurs. You can then use th...

I am looking for a way to share the output of my event function with the main function used by the ode solver.

If you specify a terminal event in the event function, then the integration will halt when the event occurs. You can then use th...

oltre un anno ago | 0

| accepted

Answered

May you help me please to continue my syytem seconder order DE function?

Since you have boundary conditions you'll want to use bvp4c or bvp5c. See <https://www.mathworks.com/help/matlab/math/boundary-v...

May you help me please to continue my syytem seconder order DE function?

Since you have boundary conditions you'll want to use bvp4c or bvp5c. See <https://www.mathworks.com/help/matlab/math/boundary-v...

oltre un anno ago | 0

Answered

Dynamics of Vibro-Impact system with impact condition

If you use |ode45| then a chunk of your code becomes moot - you just need the initial conditions |y0| and time span |[t0 tfinal]...

Dynamics of Vibro-Impact system with impact condition

If you use |ode45| then a chunk of your code becomes moot - you just need the initial conditions |y0| and time span |[t0 tfinal]...

oltre un anno ago | 0

Answered

Event function in ode45

My guess is you are using the "old" way to pass parameters to the ODE function F, where they are specified as trailing input arg...

Event function in ode45

My guess is you are using the "old" way to pass parameters to the ODE function F, where they are specified as trailing input arg...

oltre un anno ago | 1

Answered

How do I speed up ODE15s?

Some things to try... # For stiff problems you should always specify the Jacobian or its sparsity pattern via the options str...

How do I speed up ODE15s?

Some things to try... # For stiff problems you should always specify the Jacobian or its sparsity pattern via the options str...

oltre un anno ago | 2

| accepted

Answered

How to find probability density for two data sets plotted on same histogram?

Two ideas come to mind... 1. You can combine the data sets into one so that the normalization takes into account the total nu...

How to find probability density for two data sets plotted on same histogram?

Two ideas come to mind... 1. You can combine the data sets into one so that the normalization takes into account the total nu...

oltre un anno ago | 0

Answered

How to fix: Index Exceeds Matrix Dimensions

The issue is with the line: M(i,:)=noise(P(i):P(i)+10); You want to take the index |P(i)| and grab the next 10 elements ...

How to fix: Index Exceeds Matrix Dimensions

The issue is with the line: M(i,:)=noise(P(i):P(i)+10); You want to take the index |P(i)| and grab the next 10 elements ...

oltre un anno ago | 0

Answered

Error message when computing integral: first input argument must be a function handle

If you want to compute the integral symbolically by keeping the line "syms x;", then you'll need to use the function in Symbolic...

Error message when computing integral: first input argument must be a function handle

If you want to compute the integral symbolically by keeping the line "syms x;", then you'll need to use the function in Symbolic...

oltre un anno ago | 3

| accepted

Answered

How to construct an undirected graph by reading edge by edge from a text file

You can use |textscan| to read the text file into a cell array, with the first entry listing the source nodes and the second ent...

How to construct an undirected graph by reading edge by edge from a text file

You can use |textscan| to read the text file into a cell array, with the first entry listing the source nodes and the second ent...

oltre un anno ago | 0

Answered

How to do 2D interpolation

Assuming that |y1| and |y2| are separate functions evaluated at the points in |X|, you are still just doing 1-D interpolation. M...

How to do 2D interpolation

Assuming that |y1| and |y2| are separate functions evaluated at the points in |X|, you are still just doing 1-D interpolation. M...

oltre un anno ago | 1

Answered

problems when adding a column to tall array

In the first case the reason you get an error is because you are attempting to add a tall variable to the table that was created...

problems when adding a column to tall array

In the first case the reason you get an error is because you are attempting to add a tall variable to the table that was created...

oltre un anno ago | 0

| accepted

Answered

minimize cost function for undirected graph

<http://www.mathworks.com/help/matlab/ref/graph.maxflow.html maxflow> can calculate minimum cuts. Also, <http://www.mathworks.co...

minimize cost function for undirected graph

<http://www.mathworks.com/help/matlab/ref/graph.maxflow.html maxflow> can calculate minimum cuts. Also, <http://www.mathworks.co...

oltre un anno ago | 0

Answered

Help with graphs - breadth search

This example should be helpful: <http://www.mathworks.com/help/matlab/math/visualize-breadth-first-and-depth-first-search.htm...

Help with graphs - breadth search

This example should be helpful: <http://www.mathworks.com/help/matlab/math/visualize-breadth-first-and-depth-first-search.htm...

oltre un anno ago | 0

Answered

How to use kmeans function on data stored by datastore function?

Datastore is just a framework for loading small chunks of the data at a time, so you can't call generic functions directly on th...

How to use kmeans function on data stored by datastore function?

Datastore is just a framework for loading small chunks of the data at a time, so you can't call generic functions directly on th...

circa 2 anni ago | 1

Solved

Side of a rhombus

If a rhombus has diagonals of length x and x+1, then what is the length of its side, y? <<http://upload.wikimedia.org/wikipe...

oltre 2 anni ago