transform fprintf in disp

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 个)

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.

标签

评论:

2020-5-20

Community Treasure Hunt

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

Start Hunting!

Translated by