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:
can sparse be applied to cell function?

Subject: can sparse be applied to cell function?

From: Lin

Date: 12 Mar, 2009 14:35:05

Message: 1 of 1

Hi all,

A = [0 0 1;
 1 0 0;
 0 0 0];

S = sparse (A);

In this case, I will get the correct result. If A is a cell as follows:

A = cell (3,3);

A{1,3} = 1;
A{2,1} = 1;

I know sparse cannot be used in this context. Is there any similar function which can be used to squeeze all the zero elements out ? Thanks for helping.

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