필터 지우기
필터 지우기

I want to multiply 2 arrays

조회 수: 1 (최근 30일)
summyia qamar
summyia qamar 2016년 12월 14일
편집: Stephen23 2016년 12월 14일
A=
[4951;
5782;
9553;10384]
B=[2;2.5;2.8;3]
C=A.*B or bsxfun(@times,A,B)
the result is
1.0e+04 *
0.9902
1.4455
2.6748
3.1152
why is this so?

답변 (2개)

John D'Errico
John D'Errico 2016년 12월 14일
편집: John D'Errico 2016년 12월 14일
Oh. That is not the product of those numbers? Seems right to me, as long as you don't miss that factor of 1e4 out front.
What did you expect?
doc format
  댓글 수: 2
summyia qamar
summyia qamar 2016년 12월 14일
how to get the exact numbers?without this 1e4 format
Guillaume
Guillaume 2016년 12월 14일
As per John's anwser:
doc format
Or if it's really that hard to type that into matlab, click on this link
Personally, I use format longg

댓글을 달려면 로그인하십시오.


David Barry
David Barry 2016년 12월 14일
I don't see the problem. What are you expecting the answer to be?
  • 4951 * 2 = 9902
  • 5782 * 2.5 = 14455
  • etc...
  댓글 수: 2
summyia qamar
summyia qamar 2016년 12월 14일
the exact values..correct decimal place
David Barry
David Barry 2016년 12월 14일
MATLAB has given you the exact values. Do you not understand scientific notation? I suggest you Google it if not. What exactly do you mean by "correct decimal place".

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by