Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
use of "ndSparse"

Subject: use of "ndSparse"

From: wahyoe Unggul

Date: 27 Mar, 2011 18:10:21

Message: 1 of 1

hi
how the use of "ndSparse", I've tried a few times put him, but the results I get is an error, can you give me a solution?

prop =[[1 2.10e5 450 0 7.85e-5;
          2 2.20e5 800 0 7.85e-5;
          3 2.60e5 500 0 7.85e-5;
         4 2.80e5 700 0 7.85e-5]
element=[1 1 5 1 0 ;
               2 2 5 2 0 ;
                3 3 5 3 0 ;
                4 4 5 4 0 ]
L =1.0e+003*[6.2048 6.2048 4.5277 4.5277]
nel =4
ni =6

Kel=zeros(ni,ni,nel)
E=prop(element(:,4),2)
A=prop(element(:,4),3)
for i=1:nel
    Kel(:,:,i)=(E(i)*A(i))/L(i)*[1 0 0 -1 0 0;
                                 zeros(2,6);
                                 -1 0 0 1 0 0;
                                 zeros(2,6)]
   
end

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us