New to matlab, trying to understand basic functions still
Show older comments
Hello! I am new to matlab and I am working with some data, however, I am trying to understand what it means with the following (hopefully this makes sense):
x= D0a(:,1); nf=length(x);
y=(1:9)'; ns= length(y);
D0a is the element.
Accepted Answer
More Answers (2)
the cyclist
on 2 Nov 2023
0 votes
Assuming that D0a is a matrix, then
- x is the 1st column of that matrix. (x is a column vector.)
- nf is the number of elements in that vector x.
- y is the vector [1 2 3 4 5 6 7 8 9], but then transposed to be a column vector, rather than a row vector.
- ns is the number of elements in that vector y.
You are right that these are very basic questions. I strongly suggest you invest a couple hours in viewing the free MATLAB Onramp online tutorial.
John D'Errico
on 2 Nov 2023
0 votes
If you are this new to MATLAB, then you seriously need to spend some tie reading the tutorials available.
The MATLAB Onramp is a good place to start. But there are also many other things you can read. Why not read the manual? Yes, I know, you don't need no steenkin' mauals. Spend a couple of hours. It will pay dividends.
Categories
Find more on Get Started with MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!