Solving simple equation in Matlab

  • Thread starter Thread starter Inertigratus
  • Start date Start date
  • Tags Tags
    Matlab
Click For Summary
SUMMARY

The discussion focuses on solving the equation H(f)X(f) = Y(f) in MATLAB, where H(f) is intended to be a column vector. The user encountered an "Out of Memory" error when attempting to compute H(f) using standard division. The solution provided emphasizes the necessity of using element-wise division by replacing the '/' operator with './' to avoid MATLAB's matrix division behavior.

PREREQUISITES
  • Understanding of MATLAB syntax and operations
  • Familiarity with vector mathematics
  • Knowledge of element-wise operations in MATLAB
  • Basic concepts of linear equations
NEXT STEPS
  • Research MATLAB element-wise operations and their syntax
  • Explore MATLAB's matrix division and its implications
  • Learn about handling large datasets in MATLAB to avoid memory errors
  • Investigate vector manipulation techniques in MATLAB
USEFUL FOR

Students, engineers, and researchers working with MATLAB who need to solve linear equations or perform vector operations efficiently.

Inertigratus
Messages
123
Reaction score
0

Homework Statement


I want to solve for H(f).
I know that f is supposed to be constant.
X(f) and Y(f) are both column vectors with a total of 32768 rows.

Homework Equations


H(f)X(f) = Y(f)

The Attempt at a Solution


I tried dividing, H(f) = Y(f)/X(f) but got an "Out of Memory" error.
It's not a matrix so I can't find an inverse too.
Any ideas?
I think H(f) is supposed to be a column vector as well, but since f is supposed to be constant then all entries will be the same.
Nevermind, It's simply elementwise division, but something's wrong...
 
Last edited:
Physics news on Phys.org
Hi,

To perform element-wise division in Matlab (which I think is what you're trying to do), you must precede the forward slash with a full stop.

I.e. replace '/' with './'

Matlab performs matrix right division when the operator '/' is used, and I'm not entirely sure what that entails for two column vectors.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 8 ·
Replies
8
Views
4K
Replies
13
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K