이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
이전 댓글 표시
0 개 추천
Hi,
how can I change format of sym number? For example:
a=sym(2.34353453465464);
b=sym(4.6546455789879324352);
format short
c=a*b
Format short doesn't work.
Thanks
댓글 수: 1
Sean de Wolski
2012년 3월 1일
also note, b is converted to double before sym and some precision is lost
채택된 답변
Andrew Newell
2012년 3월 1일
1 개 추천
c = vpa(a*b,4)
댓글 수: 11
john
2012년 3월 1일
big thanks
john
2012년 3월 6일
Hi, I have problem with my code: vpa works for "result", but I need show result in the uitable1, but for "res" command vpa doesn't work.
matrix=[A B;C D]
a=simple(matrix\X);
b=sym(a)
result=vpa(b,4)
f=size(result);
for i=1:f(1);
for j=1:f(2);
res(i,j)=cellstr(char(result(i,j)));
end
end
set(handles.uitable1,'Data',res);
Andrew Newell
2012년 3월 6일
I suggest you make a new question of this.
john
2012년 3월 6일
Hi,
if a=vpa(sym('ddddddd'),3), result is ddddddd
if a=vpa(sym('-ddddddd'),3) result is -1.0*ddddddd, but I don't like it, I would like have -ddddddd..
it is possible?
Andrew Newell
2012년 3월 6일
I can't reproduce your result. If I type
vpa('1.234567',3)
vpa('-1.234567',3)
I get 1.23 and -1.23.
john
2012년 3월 6일
You result is OK, but try it for symbolic objects for example vpa(sym('ddddddd'),3)......result is -1.0*ddddddd,,,,,or you have different result?
Andrew Newell
2012년 3월 6일
I added sym() and the result was the same. What version of MATLAB are you using?
john
2012년 3월 6일
7.12.0.635 (R2011a), and you?
Did you try with vpa(sym('-ddddddd'),3) also?
Walter Roberson
2012년 3월 6일
MuPAD's unary minus gets converted automatically to -1 times the value, and there is no way to stop that conversion.
Overriding MuPAD's pretty-printer formatting for an expression is not much fun.
john
2012년 3월 6일
ok,
thank you again
Andrew Newell
2012년 3월 6일
I was using the Maple Toolbox.
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Common Operations에 대해 자세히 알아보기
태그
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
