transform fprintf in disp

1 view (last 30 days)
Nuno Duarte
Nuno Duarte on 19 May 2020
Commented: darova on 20 May 2020
hey, how do i turn this:
fprintf('\nPara i= %d\n e a= %f e a resposta é: %f ', i, n, c)
into the function disp?
  1 Comment
Ameer Hamza
Ameer Hamza on 19 May 2020
Can you further explain what is your intended output?

Sign in to comment.

Answers (1)

Tommy
Tommy on 20 May 2020
Maybe this?
disp(sprintf('\nPara i= %d\n e a= %f e a resposta é: %f ', i, n, c))
You'll get a warning that fprintf is preferred.

Community Treasure Hunt

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

Start Hunting!