As mentioned in the comments, if you want to compare one atom at a time, the proper way to index is Atom(i3).AtomSerNo. But if you want to do the comparison more efficiently, you can "vectorize" the operation to work across all atoms at once using ismember. The way that I would assign values from matrix4 at once requires me to put them all in a temproary cell array. I would write that code something like this:
[serNoIsInMat4, locationInMat4] = ismember([PDBStructmodel.Model.Atom.AtomSerNo], matrix4(1,:));
tempFactorCell = num2cell(matrix4(2,locationInMat4(serNoIsInMat4)));
[PDBStructmodel.Model.Atom(serNoIsInMat4).tempFactor] = tempFactorCell{:};
There might be some mistakes in my code. Since I don't have access to your data, it's hard for me to confirm I wrote things properly. But hopefully this is enough to help you understand how to proceed.