how to resize a matrix?

5 vues (au cours des 30 derniers jours)
trailokya
trailokya le 20 Nov 2014
Commenté : trailokya le 22 Nov 2014
I have a matrix A of dimension 129*135. I want to make it 135*135 by adding some NaN values. How is it possible in a simple way?

Réponse acceptée

Azzi Abdelmalek
Azzi Abdelmalek le 20 Nov 2014
Modifié(e) : Azzi Abdelmalek le 20 Nov 2014
a=rand(129,135) % Example
a(end+1:135,:)=nan
  3 commentaires
Azzi Abdelmalek
Azzi Abdelmalek le 20 Nov 2014
The same thing
a=rand(129,135,33);
a(end+1:135,:,:)=nan
trailokya
trailokya le 22 Nov 2014
thank you sir

Connectez-vous pour commenter.

Plus de réponses (1)

Phillip
Phillip le 20 Nov 2014
Hi
There are a number of ways you can do this. At the command prompt type:
help vertcat
and
help nan
This will get you started. Matlab's very powerful at indexing etc. So reading through the basic tuturials and examples will get you started quickly
Regards, Phil
  1 commentaire
trailokya
trailokya le 20 Nov 2014
thanks :)

Connectez-vous pour commenter.

Catégories

En savoir plus sur Resizing and Reshaping Matrices dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by