Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

fprintf to create a table of numbers

5 visualizzazioni (ultimi 30 giorni)
NIMA RAHMANI MEHDIABADI
NIMA RAHMANI MEHDIABADI il 22 Mag 2019
Chiuso: MATLAB Answer Bot il 20 Ago 2021
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 Commenti
Saumya Goel
Saumya Goel il 24 Mag 2019
I am not sure if you meant by triple the numbers as "Multiply by 3". Then you can simply use multiply.

Risposte (0)

Questa domanda è chiusa.

Prodotti


Release

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by