gruber
gruber

Reputation: 29719

Solving nonalgebraic equations

How can I solve an equation such as

(1/5)^x - 4x = 0

using Matlab?

Upvotes: 0

Views: 226

Answers (3)

Franck Dernoncourt
Franck Dernoncourt

Reputation: 83157

Alternatively you can use MATLAB's gatool if your equation is complex.

function [F]=fitness_A(x)
F = abs((1/5).^x - 4.*x);
end

enter image description here

Full size: http://img534.imageshack.us/img534/4428/gatool2.png (showing another fitness function).

Upvotes: 1

Squazic
Squazic

Reputation: 3690

Try the solve function.

syms x
solve((1/5)^x - 4x)

Upvotes: 1

Albert Wifstrand
Albert Wifstrand

Reputation: 230

That's not an equation, it's just an expression. Did you mean this?

(1/5)^x - 4x = 0

Upvotes: 2

Related Questions