エクセルシートへの自動書き込み

11 visualizaciones (últimos 30 días)
toshi shwa
toshi shwa el 8 de Feb. de 2022
Comentada: toshi shwa el 11 de Feb. de 2022
プログラムを走らせて算出された数字を、任意のエクセルシートに自動入力するには、
どのようにしたら良いでしょうか。
例)ans=56
ans=24
   ・
   ・
   ・
  ans=20
合計で60個数字が算出されます。エクセルシートに行入力(横に入力)できればと思います。

Respuesta aceptada

Hernia Baby
Hernia Baby el 8 de Feb. de 2022
個人的には一度結果を格納して書き出すのがいいかなと思っています。
ここでの a は列ベクトルなのでエクセルにも列ベクトル方向に書き込まれます。
clc,clear,close all;
n = 60;
a = zeros(1,60);
for i = 1:n
a(i) = i;
end
writematrix(a,'sample.xlsx')
随時行う場合は以下をご覧ください。
  1 comentario
toshi shwa
toshi shwa el 11 de Feb. de 2022
ありがとうございます!作業が非常に楽になりました。

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Data Import from MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!