Clear Filters
Clear Filters

what is that problem? "Optimization running. Error running optimization. Undefined function 'power' for input arguments of type 'timeseries'"

2 views (last 30 days)
how can I solve this problem
Optimization running. Error running optimization. Undefined function 'power' for input arguments of type 'timeseries'
I am using matlab R2016a, using genetic algorithm to get the minimum values for PID controller in a switched reluctance motor. please anyone can help tell me how to solve this problem? thanks

Accepted Answer

Walter Roberson
Walter Roberson on 9 Aug 2016
Consider for example,
a = timeseries(1:10);
a .^ 2
then that would generate that error, because you are trying to square the timeseries object.
Possibly you want to square the data in the object:
a.Data .^ 2
  2 Comments
khaled awad
khaled awad on 9 Aug 2016
Edited: Walter Roberson on 9 Aug 2016
thanks for your fast feedback, for your info this is my code.
function f = kh (m)
global x1 x2 x3
x1 = m(1);
x2 = m(2);
x3 = m(3);
sim ('genetic_algo')
f = trapz (tout,(spo));
end
is it right or needs a modifications

Sign in to comment.

More Answers (1)

khaled awad
khaled awad on 9 Aug 2016
this is a new comment on my simulation

Categories

Find more on Specialized Power Systems in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!