The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: How to solve very complex equations in matlab?
Replies: 13   Last Post: Jul 6, 2013 7:20 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Torsten Hennig

Posts: 2,419
Registered: 12/6/04
Re: How to solve very complex equations in matlab?
Posted: Jul 4, 2013 5:34 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

> f1,f2,f3,f4 are functions. So, I don't think we can
> add them to a value(sum is initialized to 0).
> these three commands are not working.
> sum1=sum1+f1*f2;
> sum2=sum2+f1*f3;
> sum3=sum3+f1*f4
> I tried it. Please check it once. May be we have to
> initialize in a different way. I have written the
> four functions separately in .m files and called
> them. Once check it if you can.
> Thanks,
> srinath

In my notation, your functions are func_1, func_2, funk_3 and func_4 - f1,f2,f3 and f4 are the values the functions produce for the input arguments x,y,z,a(j) and b(j).
You can define the functions before the for-loop by setting e.g.
func_1 = @(x,y,z,a,b) x+y+z+2*a+4*b;
If your functions are more complicated, you will have to put them in separate m-files which will look like

result1 = func_1(x,y,z,a,b)

Best wishes

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.