Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

fprintf to create a table of numbers

조회 수: 10 (최근 30일)
NIMA RAHMANI MEHDIABADI
NIMA RAHMANI MEHDIABADI 2019년 5월 22일
마감: MATLAB Answer Bot 2021년 8월 20일
Hi everyone
so im trying to print a table of numbers here is my code
x = linspace(0,4,10);
y = sinh(x);
z = cosh(x);
g = [x;y;z]
fid = fopen('C:\Users\User\Desktop\myname\Out.txt', 'w');
fprintf('x\t sinh(x)\t cosh(x)\n');
fprintf(fid, '%6.2f %12.8f %12.8f\n', g);
fclose(fid);
if i want to triple the numbers in the outcome how can i do it?
  댓글 수: 3
Saumya Goel
Saumya Goel 2019년 5월 24일
I am not sure if you meant by triple the numbers as "Multiply by 3". Then you can simply use multiply.
per isakson
per isakson 2019년 5월 24일

답변 (0개)

이 질문은 마감되었습니다.

태그

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by