Please help if you can
显示 更早的评论
Can you make matlab give answers in line with "ans = " , here is a photo(adress bellow text) of what i need , if this is possible please tell me how to do that. Thanks in advance http://imageshack.us/photo/my-images/28/42343019.jpg/
1 个评论
Oleg Komarov
2012-2-28
Do you need that just for customization or for other specific reasons?
采纳的回答
更多回答(3 个)
Sean de Wolski
2012-2-28
doc fprintf
1 个评论
Oleg Komarov
2012-2-28
fprintf('\b %f',3)
This option obviously doesn't consider the get(0,'format') in use and the type of variable.
Thus, as Walter says, it is possible but would require quite some coding, which honestly IMO is in general not justified (and specifically in this case, since the OP did not motivate the use of it).
Walter Roberson
2012-2-28
0 个投票
It is possible in theory: you can overwrite the method named "display". Which can be a big nuisance to do, but it is possible.
Milos Ivankovic
2012-2-29
0 个投票
2 个评论
Jan
2012-2-29
You can fake it by using "input('>> ', 's'); disp('ans = '); eval(S), input('>> ', 's');". I cannot check this currently, but it should look like a real command line output.
Milos Ivankovic
2012-3-1
类别
在 帮助中心 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!