# error when using mne\_read\_forward\_solution: operands must be convertible to logical scalar

**URL:** <https://mne.discourse.group/t/error-when-using-mne-read-forward-solution-operands-must-be-convertible-to-logical-scalar/453>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [June 9, 2012, 7:35pm UTC](https://mne.discourse.group/t/error-when-using-mne-read-forward-solution-operands-must-be-convertible-to-logical-scalar/453 "2012-06-09T19:35:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [June 9, 2012, 7:35pm UTC](https://mne.discourse.group/t/error-when-using-mne-read-forward-solution-operands-must-be-convertible-to-logical-scalar/453/1 "2012-06-09T19:35:18Z")

</div>

This is what I got at the Matlab command window:

> > [fwd]=mne\_read\_forward\_solution(fname,force\_fixed);

Reading forward solution from A6\_ec1\_fen\_ds250\_ico3\_bem5120\_fwd.fif...  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reading a source space...[done]  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reading a source space...[done]  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2 source spaces read  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Read EEG forward solution (1284 sources, 257 channels, free orientations)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Source spaces transformed to the forward solution coordinate frame  
??? Operands to the || and && operators must be convertible to logical scalar values.

Error in ==\> mne\_read\_forward\_solution at 246  
if fwd.source\_ori == FIFF.FIFFV\_MNE\_FIXED\_ORI || ...

There was no complaint when I used this forward solution in my analysis to compute inverse solutions in mne\_analyze.  
How should I begin troubleshooting this?

-Jeff

-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20120609/48c90a48/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20120609/48c90a48/attachment.html)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [June 10, 2012, 9:20am UTC](https://mne.discourse.group/t/error-when-using-mne-read-forward-solution-operands-must-be-convertible-to-logical-scalar/453/2 "2012-06-10T09:20:44Z")

</div>

Did you set force\_fixed to either true or false. I do not have any trouble reading your forward solution.

- Matti

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [June 10, 2012, 6:47pm UTC](https://mne.discourse.group/t/error-when-using-mne-read-forward-solution-operands-must-be-convertible-to-logical-scalar/453/3 "2012-06-10T18:47:53Z")

</div>

I also have no problem reading your fwd solution.

do you have the latest mne-matlab code [1] ?

Alex

[1] [https://github.com/mne-tools/mne-matlab](https://github.com/mne-tools/mne-matlab)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [June 10, 2012, 7:04pm UTC](https://mne.discourse.group/t/error-when-using-mne-read-forward-solution-operands-must-be-convertible-to-logical-scalar/453/4 "2012-06-10T19:04:35Z")

</div>

> I also have no problem reading your fwd solution.
> 
> do you have the latest mne-matlab code [1] ?

I think the problem was that that force\_fixed could not be interpreted as logical value. It should be one of true/false.

- Matti
