Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

(Matlab)Piecewise Linear Function Fit?

Status
Not open for further replies.

davyzhu

Advanced Member level 1
Joined
May 23, 2004
Messages
494
Helped
5
Reputation
10
Reaction score
2
Trophy points
1,298
Location
oriental
Activity points
4,436
piecewise linear fit matlab

Hi all,

Sometimes I get very complex function, like y=x*2^x*5^x, that not easy to calculate in program.
So I'd like to fit it to piecewise linear Function?

How to do it in Matlab?

Any suggestions will be appreciated!
Best regards,
Davy
 

matlab piecewise symbolic math

Dear explorer,

I solve the same problems in symbolic.
first define the x,y as symbolic parameters,
1- >> syms x,y;
2- >> y=f(x)...
3- >> x=1;
4->> subs(y).

for example, the solution done for x=1.
if necessary you can convert y from syms. to double.

get another helpes with MATLAB (search).

regards
 

    davyzhu

    Points: 2
    Helpful Answer Positive Rating
matlab symbolic math piecewise

Hi manasiri,

What's the difference with symbolic math and normal math?

Best regards,
Davy
 

program for piecewise linear function in matlab

in sumbolic math you can solve an equation.(you can find x values that make equation true.)
excuse me, i forgot an important command "solve".

then you should insert the ">>solve(y);" after step2.

please go to the HELP of matlab and search the following commands.

solve , dsolve, subs, syms,
you may found some another good notes regarding the problem.

best regards
 

    davyzhu

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top