double error syms code
    4 vues (au cours des 30 derniers jours)
  
       Afficher commentaires plus anciens
    
    yogeshwari patel
 le 4 Jan 2022
  
    
    
    
    
    Commenté : Mitchell Thurston
      
 le 4 Jan 2022
            syms x t  a
%a=1/2;
N=3;
U=zeros(1,2,'sym');
A=zeros(1,2,'sym');
B=zeros(1,2,'sym');
series(x,t)=sym(zeros(1,1));
U(1)=simplify(1+sin(x));
%alpha=input('enter the value of alpha=')
%case1 
% for i=1:8
%     U(i+1)=simplify((diff(U(i),x,2)+U(i))*gamma(a*(i-1)+1)/gamma((a*(i+1-1))+1));
% end
 for i=1:3
     A=0;
     for j=1:i
      A=A+U(j)*U(i-j+1);   
     end
     U(i+1)=simplify((diff(U(i),x,2)-A(1))
 end
disp(U)
for k=1:2
      series(x,t)=simplify(series(x,t)+U(k)*(power(t,a*(k-1))));
 end
   series
%  C=zeros(1,1);
% series
  C=zeros(1,1);
for x=1:3
     e=(x-1)/10;
     for t=1:6
         f=((t-1)/10);
         C(x,t)=series(e,f);
     end   
end
The following error occurred converting from sym to double:
Unable to convert expression into double array.
Error in fractionakelingordanequation (line 33)
         C(x,t)=series(e,f);
1 commentaire
  Mitchell Thurston
      
 le 4 Jan 2022
				it looks like this particular function is undefined at (0,0), so you might have some issues with that loop
Réponse acceptée
  Steven Lord
    
      
 le 4 Jan 2022
        Preallocate C to be a sym array.
syms x  
C=zeros(3, 6, 'sym')
C(2, 3) = x.^2
0 commentaires
Plus de réponses (0)
Voir également
Catégories
				En savoir plus sur Formula Manipulation and Simplification 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!




