Create a Matrix from defined variables
    5 次查看(过去 30 天)
  
       显示 更早的评论
    
Hey guys, I'm trying to create a matrix with combined math operations from already defined variables in the workspace but I always get an error. I would really appreciate some help :) 
Variables : 
c1=440
c2=250
r1= 50
r2=25 
Matrix : 
C=[c1*r1^2,    c1*r1*r2,   0;
   c1*r2*r1, c2+c1*c2^2, -c2;
   0,          -c2,       c2]
2 个评论
采纳的回答
  KSSV
      
      
 2022-1-22
        c1=440 ;
c2=250 ;
r1= 50 ;
r2=25 ;
C=[c1*r1^2,    c1*r1*r2,   0;
   c1*r2*r1, c2+c1*c2^2, -c2;
   0,          -c2,       c2]
更多回答(1 个)
  Louis Alexander
 2022-1-22
        this code is right.
c1=440 
c2=250 
r1= 50 
r2=25 
C=[c1*r1^2,    c1*r1*r2,   0;
   c1*r2*r1, c2+c1*c2^2, -c2;
   0,          -c2,       c2]
there could other reasons for the error.
另请参阅
类别
				在 Help Center 和 File Exchange 中查找有关 Whos 的更多信息
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



