ECE4305 ]]>

Consider starting Matlab this way:

`matlab -nosoftwareopengl`

`figure`

set(gcf,'renderermode','manual','renderer','painters')

plot(randn(100,1))

If you can’t start Matlab with the -nosoftwareopengl open, omit that open and try plotting with the

set(gcf….’painters’) line as shown above for each figure.

]]>

The mexopencv package that has been available for some time (and that works with earlier versions of Matlab) seems to be more user-friendly once installed–you use it much like any other Matlab toolbox, without you needing to code in C++/Mex yourself.

Bottom line: I’ll still be using Python/OpenCV without Matlab, or even C++/OpenCV, which looks easier than using Mex with Matlab. I am glad Mathworks has taken this step; maybe the mexopencv people will make the R2014b OpenCV support easier to use by making a bunch of .cpp functions to compile once and then call.

This process gets the packages downloaded and installed:

http://www.mathworks.com/help/vision/ug/install-data-for-computer-vision-system-toolbox.html

The directory with examples is at:

~/Documents/MATLAB/SupportPackages/R2014b/opencvinterface/toolbox/vision/supportpackages/visionopencv/example/

Here’s how the first example, the Foreground Detector works from Matlab:

`cd ~/Documents/MATLAB/SupportPackages/R2014b/opencvinterface/toolbox/vision/supportpackages/visionopencv/example/ForegroundDetector`

```
```mexOpenCV backgroundSubtractorOCV.cpp

`testBackgroundSubtractor`

You will see a Video Player window pop up with cars driving by, with the cars detected outlined in white rectangles.

]]>We might investigate reshaping the matrix into a 1xN vector into Python, and reshape back to a matrix when done, but I think Matlab will make copies at both reshapings.

I can pass

`py.numpy.sqrt(2)`

ans=1.4142 and

`py.numpy.sqrt([2,2])`

ans=[ 1.41421356 1.41421356]

but I** cannot pass**

` py.numpy.sqrt([2,2;2,2])`

Error using py.numpy.sqrt

Conversion of MATLAB 'double' to Python is only supported for 1-N vectors.

That seems useless for a large majority of cases people would want to use Matlab for. Hopefully I am sorely mistaken.

the link below seems to confirm that you cannot pass normal 2D matrices to Python from Matlab R2014b:

]]>#!/usr/bin/env python from mpl_toolkits.mplot3d import Axes3D # this line must come before the next line! from matplotlib.pyplot import figure,show from numpy import linspace,meshgrid,pi,sin #for testing ''' key point: the line "from mpl_toolkits.mplot3d import Axes3D" needs to come before the "from matplotlib.pyplot import ...." line in the FIRST file you run. To be sure, I make the "from mpl_toolkits.mplot3d ..." line come first in my main function file (the one I invoke from the command line or Spyder) ''' def test(): x,y = meshgrid(linspace(0,2*pi),linspace(0,2*pi)) z = sin(x+0.5*y) ax = figure().gca(projection='3d') ax.plot_wireframe(x,y,z) show() if __name__ == '__main__': test()]]>

To do this, you need to do:

import matplotlib.pyplot as plt

from matplotlib.ticker import MaxNLocator

....

ax = plt.figure().gca()

...

ax.xaxis.set_major_locator(MaxNLocator(integer=True))

This will make the x-axis have integer-only labels. You can do the same for yaxis if you want. ]]>

The real life ham bands where the FM next to weak signal situation might occur (in the USA) based on the ARRL band plan include:

50MHz: The SSB/CW only and “any mode” meet at 50.3MHz. Maybe most FM operators stay about 51MHz? I have the equipment for this band but regrettably don’t listen often.

144MHz: I assume most weak signal work is at least 100kHz away from the popular 144.390MHz APRS frequency

220MHz: Again a case of ~100kHz spacing between FM and whatever weak signal work may exist

440MHz: The satellite band with what are typically very directive antennas keep multi-MHz separation between FM and weak-signal

900MHz: I would expect below 902.080MHz and above 902.120MHz to be trashed for weak signal operators according to the band plan.

The situation I felt hinges on:

a) what the relevant FCC specifications demand for “off-channel, in-band” emissions — is this just specified as say -60dB so many kHz from center channel, or with an emission mask. In either case, is the specification sufficient to protect a weak signal operator within N km of a powerful FM transmitter?

b) If the specification is not sufficient for weak signal protection from nearby (in range) FM transmitters, do the practical filter implementations used by the most frequently used equipment provide enough protection any way as a corollary to meeting the FCC specification?

However, you can run STK from VirtualBox using Windows guest virtual machine.

Currently (with VirtualBox 4.3.16) you may find that STK crashes upon opening a scenario. Shutdown your virtual machine and try disabling 3D acceleration, enabling 2D acceleration, and setting video memory to at least 64MB. This “worked for me” ]]>