MATLAB: How to extract information from cell

cellextract data

Hello
Well , i have a file which is a cell 47×1. In one of the rows have Lastname=Ahlers I only need Ahlers.The other case is when i have character +numbers, here I have dimension=2 only I need 2,other example is CollX=-5.9 only i need -5.9.
Any idea would be really appreciated guys thanks
Ah I dont know the last name or any data from the file. The idea would be to get the name or value. I need the values (numbers) to run my code,they are parameters inside of my code. Each file is a different patient and each patient has different values.

Best Answer

use strfind to find the equal sign and then extract out the data to the right hand side of the equals, i.e.
NEWVAR = str2num(YOURCELL{YOUR_INDEX}(strfind ( YOURCELL{YOUR_INDEX}, '=' )+1:end))
in this case: you have a string "CollX=-5.9"
YOURCELL{1} = 'CollX=-5.9'
NEWVAR = str2num(YOURCELL{1}(strfind ( YOURCELL{1}, '=' )+1:end))