How to obtain this format using either disp or fprintf??? Any basic instruction?

 Accepted Answer

>> data=[1 1.00; 2 2.30; 3 5.79];
>> fprintf('F%d %.2f\n',data.')
F1 1.00
F2 2.30
F3 5.79
>>

2 Comments

What if I have to print arrays i.e
A=[2 3 4 6] B=2*A In the same form
You're not even trying..
fprintf('F%d %.2f\n',[A;B].')

Sign in to comment.

More Answers (0)

Asked:

on 17 Sep 2017

Commented:

dpb
on 17 Sep 2017

Community Treasure Hunt

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

Start Hunting!