Array division of two non-zero arrays returns zero

조회 수: 3 (최근 30일)
GCats
GCats 2021년 6월 18일
답변: Matt J 2021년 6월 18일
Hi everyone!
I have 2 very long arrays X and Y (each with dimensions 16384x1) with the first one with values in the range 0.230286000000000-0.189370000000000 and the second one with range 12.191100000000000-0.041792500000000.
I need to perform array divison Y/X so to get a matrix of 16384x16384. However, when I perform the division all the entries are zero. This is the format I'm using:
format long
W = double(Y)/double(X);
Any hints on where the problem may be?
Thank you!

채택된 답변

Matt J
Matt J 2021년 6월 18일
W = double(Y(:))./double(X(:).');

추가 답변 (0개)

카테고리

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

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by