Input the same value into a cell array that each cell contains different fits?

Hello dear all.
I have a cell array that each one of its cells has a fit. I need to get the output of each one of these fits for a specific input value, same for all fits.
So I was wondering if there is a neat way to do so, avoiding a double loop over the cell's dimensions (lines x columns)?
Ideally this is the matrix that I need to end up with:
fit11(t1) fit12(t1) fit13(t1) .... fit1n(t1)
fit21(t1) fit22(t1) fit23(t1) .... fit2n(t1)
..........................................................
fitm1(t1) fitm2(t1) fitm3(t1) ... fitmn(t1)
Any ideas please?
Thank you in advance,
Melina.

回答 (1 件)

Rik
Rik 2021 年 10 月 6 日
I don't think there is a way to actually avoid a loop. You can avoid a double loop like this:
results=zeros(size(CellWithFitObjects));
for n=1:numel(results)
results(n)=CellWithFitObjects{n}(t1);
end

1 件のコメント

Melina Zempila
Melina Zempila 2021 年 10 月 6 日
Oh, thank you Rik.
I'm gonna try your suggestion and hope it works.
: )
Melina.

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

カテゴリ

ヘルプ センター および File ExchangeMultidimensional Arrays についてさらに検索

タグ

質問済み:

2021 年 10 月 6 日

コメント済み:

2021 年 10 月 6 日

Community Treasure Hunt

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

Start Hunting!

Translated by