Effacer les filtres
Effacer les filtres

How to rectify the following code

1 vue (au cours des 30 derniers jours)
ESWARA MOORTHI
ESWARA MOORTHI le 28 Oct 2012
Respected Sir/Madam
Please give the ideas about How to rectify the following Error code after the 25th iterations in my program.
??? Error using ==> reshape To RESHAPE the number of elements must not change.
Error in ==> sym.maple at 94 result = reshape(result,size(varargin{3}));
Error in ==> sym.int at 39 r = reshape(maple('map','int',f(:),x),size(f));
Error in ==> Esu at 55 f1(m)=vpa(h1*int(exp(t)*int(exp(-2*t)*int(exp(t)*R1(m-1))))+g(m-1)*f1(m-1),5);
Thanking you
with regards S.Eswaramoorthi

Réponses (1)

Wayne King
Wayne King le 28 Oct 2012
The problem is that you are attempting to reshape a vector but you are changing the number of elements. For example:
x = randn(100,1);
y = reshape(x,20,5);
works because (20)(5) = 100
but
x = randn(100,1);
y = reshape(x,21,5);
generates the error you are getting. The same principle applies for symbolic arrays.

Catégories

En savoir plus sur Material Sciences dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by