フィルターのクリア

Conversion to cell from double is not possible.

3 ビュー (過去 30 日間)
Muhammad
Muhammad 2023 年 11 月 28 日
編集済み: Dyuman Joshi 2023 年 11 月 28 日
I am trying to solve delay logistic equation with multiple delay terms but for finding delayed states i am getting error and my error is
"Conversion to cell from double is not possible."
g = @(t, y, Z, par) par(1) * y * (1 - sum(par(2:end) .* Z));
tau = [1, 1.5,2,2.5,3]; % Array of different delays
par = [1.5, 0.1,0.2,0.3,0.4,0.5];
this is my equation
and I am getting error here in this part
%% Calculate delayed states for multiple delays
x_d = cell(length(tau), 1);
for k = 1:length(tau)
x_d(k) = deval(sol, t_t - tau(k));
end

採用された回答

Dyuman Joshi
Dyuman Joshi 2023 年 11 月 28 日
You need to use curly brackets, {}
%% Calculate delayed states for multiple delays
x_d = cell(length(tau), 1);
for k = 1:length(tau)
% v v
x_d{k} = deval(sol, t_t - tau(k));
end
  5 件のコメント
Matt J
Matt J 2023 年 11 月 28 日
編集済み: Matt J 2023 年 11 月 28 日
@Muhammad Please Accept-click the answer to indicate that it worked.
Dyuman Joshi
Dyuman Joshi 2023 年 11 月 28 日
Thanks @Matt J.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by