How can MATLAB help in finding an equation for a given curve?

  • Context: MATLAB 
  • Thread starter Thread starter davidmandis
  • Start date Start date
  • Tags Tags
    Curve
Click For Summary
SUMMARY

This discussion focuses on using MATLAB to derive a mathematical equation for a specific curve. The proposed solution involves a piecewise linear function defined as f(x) = x/2000 for x ≤ 4000 and f(x) = 2 for x > 4000. Additionally, the Heaviside function H(x) is utilized to create a single expression for the curve, resulting in f(x) = x/20000 + H(x-4000)(4000 - x/2000). This approach effectively combines both piecewise and continuous representations of the curve.

PREREQUISITES
  • Understanding of MATLAB programming and syntax
  • Knowledge of piecewise functions and their representations
  • Familiarity with the Heaviside function and its applications
  • Basic calculus concepts related to function continuity and limits
NEXT STEPS
  • Explore MATLAB's symbolic toolbox for function fitting
  • Learn about advanced piecewise function implementations in MATLAB
  • Investigate the use of the Heaviside function in mathematical modeling
  • Study curve fitting techniques in MATLAB, including polynomial regression
USEFUL FOR

Mathematicians, engineers, and data scientists who need to model curves and derive equations using MATLAB. This discussion is particularly beneficial for those involved in mathematical modeling and analysis.

davidmandis
Messages
1
Reaction score
0
Hi,
I need to find a single equation to represent the curve shown in the attached figure. I have access to MATLAB if that will help. Can anyone help me out?

Thanks,
David
 

Attachments

  • curve.JPG
    curve.JPG
    19.7 KB · Views: 607
Physics news on Phys.org
What exactly do you mean by "a single equation"? That can be simply written as a "piecewise linear function": f(x)= x/2000 if x\le 4000, f(x)= 2 if x> 4000.

If you want a "single expression", use the Heaviside function H(x) which is defined by "H(x)= 0 if x\le 0, H(x)= 1 if x> 1". We can fit it to f by taking H(x- 4000).

f(x)= x/20000 + H(x- 4000)(4000- x/2000)

If x\le4000, H(x- 4000)= 0 so f(x)= 1/2000. If x> 4000, H(x- 4000)= 1 so f(x)= 1/2000+ 4000- x/2000= 4000.
 

Similar threads

Replies
6
Views
4K
  • · Replies 9 ·
Replies
9
Views
4K
  • · Replies 1 ·
Replies
1
Views
1K
Replies
5
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 32 ·
2
Replies
32
Views
4K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K