Azzera filtri
Azzera filtri

How to rectify the following code

1 visualizzazione (ultimi 30 giorni)
ESWARA MOORTHI
ESWARA MOORTHI il 28 Ott 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

Risposte (1)

Wayne King
Wayne King il 28 Ott 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.

Categorie

Scopri di più su Material Sciences in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by