mad関数をcell​funで使いたいので​すが,平均値か中央値​を選ぶオプションの設​定方法がわかりません​.

3 visualizaciones (últimos 30 días)
Tadafumi Sugi
Tadafumi Sugi el 26 de Feb. de 2024
Comentada: Tadafumi Sugi el 2 de Mzo. de 2024
%中央値絶対偏差
mad(x,0)
%平均値絶対偏差
mad(x,1)
%cellfunの場合
cellfun(mad,x,1)
この場合だとうまくいきません.
どうすればいいでしょうか?

Respuesta aceptada

Kojiro Saito
Kojiro Saito el 26 de Feb. de 2024
無名関数というものを使ってみてください。
cellfun(@(a) mad(a, 1), x, 'UniformOutput', false);
  1 comentario
Tadafumi Sugi
Tadafumi Sugi el 2 de Mzo. de 2024
ありがとうございます.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2022a

Community Treasure Hunt

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

Start Hunting!