Hi everyone, I have a question, what does p by m by n matrix means,,,,as far as i know, m and n represents the order of matrix, number of rows and columns...what is the third one?
You are now following this question
- You will see updates in your followed content feed.
- You may receive emails, depending on your communication preferences.
An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Show older comments
Hi everyone, I have a question, what does p by m by n matrix means,,,,as far as i know, m and n represents the order of matrix, number of rows and columns...what is the third one?
Accepted Answer
Walter Roberson
on 1 Oct 2018
The first coordinate is always the number of rows, no matter what it is named.
The second coordinate is always the number of columns, no matter what it is named.
The third coordinate is always the number of planes, no matter what it is named.
So a p by m by n matrix has p rows, m columns, and n planes.
For example, 480 x 640 x 3 has 480 rows, 640 columns, and 3 planes (and probably represents an RGB image)
8 Comments
In the MATLAB documentation, the third dimension is named "pages" or "sheets":
With my math / science background, I am more likely to refer to the higher dimensions as planes and hyperplanes. In computer science, "pages" usually refers to the system's fundamental unit of virtual memory allocation, which was historically 512 bytes but was increased to 4096 bytes by the early 1980s; some systems still use 4096 bytes, others use larger such as 16 kilobytes.
Ayisha Nayyar
on 1 Oct 2018
Edited: Walter Roberson
on 1 Oct 2018
Thanks a lot Walter,
thanks Stephen,
Now if i am particularly talking about the modalfit command,
fn = modalfit(frf,f,fs,mnum,Name,Value)
where frf is:
Frequency-response functions, specified as a vector, matrix, or 3-D array. frf has size p-by-m-by-n, where p is the number of frequency bins, m is the number of response signals, and n is the number of excitation signals used to estimate the transfer function.
in my case, I have 2500 frequency bins, 21 points response data (at all 2500 frequencies) and only one excitation signal, so my frf should be of the order;
frf=2500 x 21 x 1
is this alright??? can i write;
How to adjust this third dimension, which is 1?
more precisely, I want to ask, how to make a 3D matrix??? should i use cat? if yes; in which syntax????
Thanks a lot Torsten, really obliged.
Torsten
on 1 Oct 2018
A = zeros(p,m,n)
2500 x 21 x 1 looks like it would be a valid size for frf.
Every 2D array is also a 3D array, 4D array, 5D array, and so on, so you do not need to somehow signal to MATLAB that your 2500 x 21 is "really" 3D.
For example look at the first example, https://www.mathworks.com/help/signal/ref/modalfit.html#bvkw6bh-4 . At the time of the modalfit, u is 1 x 3000, and u' is passed in the first parameter, so modalfit is being passed an frf which is 3000 x 1, also known as 3000 x 1 x 1.
Really obliged Walter....
More Answers (0)
Categories
Find more on Spectral Analysis in Help Center and File Exchange
Tags
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- 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)