0108     <span class="comment">% bilinear matrix terms - OK?</span>
0109     <span class="keyword">if</span> (isfield(pen,<span class="string">'ki_dim'</span>))
0110       <span class="keyword">if</span> (isempty(pen.ki_dim) || any(pen.ki_dim&lt;0) || <span class="keyword">...</span>
0111         ~isfield(pen,<span class="string">'ki_idx'</span>) || ~isfield(pen,<span class="string">'kj_idx'</span>) || <span class="keyword">...</span>
0112         ~isfield(pen,<span class="string">'ki_nzs'</span>) || any(pe