How to import data in a text file as a 3d matrix in matlab? [closed] - matlab

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have a text file with the values stored as a single column. I need to import the data into matlab as a 3d matrix. How to do so?

Import them as a 1D matrix and then use reshape.
dlmread might help you with the import
and if your data is row-major, then you will want to use permute at the end.

Related

Converting a 2D matrix into a 3D matrix in matlab [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 days ago.
Improve this question
My problem is to convert my 294912x39 2d matrix into a 3D matrix 128X128X18
Using the reshape function in matlab I get errors.So, my idea is to convert it manually. My 2d matrix is 294912x39 and the 3D matrix I need is 128x128x18. Anyone could you help me?

Does Imagenet contain unlabeled data? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 1 year ago.
Improve this question
Does Imagenet contain unlabeled examples like STL-10 dataset? because I see that the dataset is used for unsupervised learning but it seems to me it has only labeled examples.
You can parse the ImageNet data using ImageFolder in Pytorch. For unsupervised learning, simply don't account for the labels coming from the Dataloader

How do I solve this complexity equation,T(n) = T(n-3)+T(n-5) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
While solving a puzzle, I ended up having a complexity of T(n)=T(n-3)+T(n-5).
I was trying subtraction method. But I am unable to solve this. Please explain what should be the procedure.
This is a linear homogeneous difference equation with constant coeffs.. It is usually solved by transforming it to the complex plane and solving a polynomial.
Without a CS background (as you state), I'm afraid the details wouldn't fit in here. Start with the Wikipedia entry, if you're interested.
If you want to skip to the final solution, here is the Wolfram Alpha for it.

Change a multidimensional vector to two dimensional vector matlab [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
A is a multidimensional vector 3x3x3. I want to change it to be 9x3 vector. How can I do this in matlab?
You can do it using the reshape function.
B = reshape(A,9,3);
vector2D = cat(2,vector3D(:,:,1),vector3D(:,:,2),vector3D(:,:,3))
or
vector2D = cat(1,vector3D(:,:,1),vector3D(:,:,2),vector3D(:,:,3))
The previous will arrange the 2D vectors along rows, while the later will arrange them allong colums

Bicubic Interpolation in Matlab [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
What is The Algorithm For ** Bi-cubic interpolation*?
I am doing this in MATLAB ( i m new to MATLAB). I have already done * Bi-linear interpolation** but i don't know how to do bi-cubic interpolation.
If you need to implement it - read Wiki, link was posted by #robocop
If you need just the result - there is a Curve Fitting Toolbox for Matlab.
Also, I guess, bicubic stands for cubic interpolation for 2D data.
So, you can use interp2 function with method='cubic' to get things done.
Read about it here