|
|
solving equation
Hi there,
I have the following minor problem;
I have a function f=x^3 + x - 1 (using x as symbolic value (syms x)) after computing the dirivative using: ff=diff(f,x)
i want to create a for loop x=1:3 and fill in the x in the ff Eguation how can i do this?
thanks in advance!
code:
syms x
f=x^3 + x - 1;
ff=diff(f,x)
for x=1:3
ff(x)
end
|
|
0
|
|
|
|
Reply
|
Paul
|
12/2/2010 9:44:06 PM |
|
On 10-12-02 03:44 PM, Paul wrote:
> I have the following minor problem;
> I have a function f=x^3 + x - 1 (using x as symbolic value (syms x))
> after computing the dirivative using: ff=diff(f,x)
>
> i want to create a for loop x=1:3 and fill in the x in the ff Eguation
> how can i do this?
>
> thanks in advance!
>
> code:
> syms x
> f=x^3 + x - 1;
> ff=diff(f,x)
> for x=1:3
> ff(x)
> end
Instead of ff(x), you would use
subs(ff)
This would be suitable for displaying the value. If you need to do numeric
computations on it, then use
double(subs(ff))
|
|
0
|
|
|
|
Reply
|
Walter
|
12/2/2010 9:49:11 PM
|
|
Thanks for your help!
|
|
0
|
|
|
|
Reply
|
Paul
|
12/2/2010 9:59:09 PM
|
|
|
2 Replies
149 Views
(page loaded in 0.022 seconds)
Similiar Articles: Solve Equation - 49G+ - comp.sys.hp48Hi With solve equation is it posible to solve for a quadratic, cubic, .. and have all the posible answers displayed? I'm trying to create and s... Solve equation using Newton-Raphson method - comp.soft-sys.matlab ...Hello, Say I have some equation in terms of constants a, b and c, and variables x and y(x): a*y^2*ln(y) - y^2 + b - 4*c*(y-1)*x + a*b*(y^2-1) = ... How to solve simulate/ solve difference equation in Matlab? - comp ...A for loop would work nicely. This particular system is unstable. -James Tama Tomi wrote: > How can I simulate or solve this kind of difference equation? Problem solving equation with Bessel functions - comp.soft-sys ...Hello there. I could use some help from the MATLAB community. Description of the problem: I would like to plot solutions for x for different val... Solving Equations for Complex Numbers - comp.sys.hp48I've set the CAS to complex mode, but the symbolic commands don't produce complex solutions, e.g. '4*x^3+8*x-4' SOLVEVX gives an empty list. Am I do... solving large number of nonlinear equations using matlab - comp ...hi i am very new to matlab. i have to solve 200 nonlinear equations using matlab. so the general syntax is [var1, var2 .....var200]=solve(exp1,ex... Solving 2 non linear equations with 2 unknown - comp.soft-sys ...These are 2 Law of Cosines equation, i need your help to solve this: (r1+150)^2 = (r1+200)^2 + 499.1^2 -2*(r1+200) * 499.1 * cos(16.177 ) r1^2 =... trouble solving system of linear equations for symbolic ...Hi, I have run into a problem of solving a system of linear equations. When solving A*x = b' by x = linsolve(A, b'), I get Matrix is close to si... Solving a system of differential equations - comp.soft-sys.matlab ...Hello all, first time poster here and as a caveat I have never used Matlab seriously before. I have a set of vector differential equations (I have w... Solving an integro-differential equation - comp.soft-sys.matlab ...Hi, In my work I have derived a nonlinear integro-differential equation which I need to solve numerically. With derivatives it is fourth order and ... SOLVING EQUATIONS - S.O.S. MathNo Title ... Copyright © 1999-MathMedics, LLC. All rights reserved. Contact us Math Medics, LLC. Equation Calculator & Solver -- Algebra.helpHint: Selecting "AUTO" in the variable box will make the calculator automatically solve for the first variable it sees. 7/27/2012 9:14:30 AM
|
|
|
|
|
|
|
|
|