why i get error at opticFlow = opticalFlowHS; matlab2015a - matlab

i don't know why i get error at opticFlow = opticalFlowHS; in matlab2015a
Undefined function or variable 'opticalFlowHS'.
Error in test (line 3)
opticFlow = opticalFlowHS;
these toolboxes already installed.
MATLAB Version 8.5 (R2015a)
Image Acquisition Toolbox Version 4.9 (R2015a)
Image Processing Toolbox Version 9.2 (R2015a)

To be able to use opticalFlowHS you need to have Computer Vision System Toolbox installed.

Related

Failed to find 'Power Electronics/Full-Bridge Converter' in library 'powerlib'?

Im trying to run a simulation (done in matlab 2020a I guess) but when running it , it gives the next error
Failed to find 'Power Electronics/Full-Bridge Converter' in library 'powerlib' referenced by Full-Bridge Converter'
But in my install it already has the toolboxes installed
SimElectronics Version 2.5 (R2014a)
SimMechanics Version 4.4 (R2014a)
SimPowerSystems Version 6.1 (R2014a)
Simscape Version 3.11 (R2014a)
I have been told these are necessary,but then what? the needed toolboxes are supposed to be installed. What more is needed?
PD
Some friend told me the simpowersystems were merged alongside the simelectronics, into SimscapePowerSystems, so guessing the model is writen in that, whats the lower version with comes with these toolbox?, 2017?, 2016?

Solve function returning symbol

I am trying to use the MATLAB Symbolic Math Toolbox to solve simple equations, but I am not receiving the expected/desired result.
I'm using Windows 10, and this is the output of entering ver into the Command Window:
MATLAB Version: 9.6.0.1335978 (R2019a) Update 8
MATLAB License Number: STUDENT
Operating System: Microsoft Windows 10 Pro Version 10.0 (Build 19041)
Java Version: Java 1.8.0_181-b13 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------
MATLAB Version 9.6 (R2019a)
Simulink Version 9.3 (R2019a)
Control System Toolbox Version 10.6 (R2019a)
Curve Fitting Toolbox Version 3.5.9 (R2019a)
DSP System Toolbox Version 9.8 (R2019a)
Data Acquisition Toolbox Version 4.0 (R2019a)
Image Processing Toolbox Version 10.4 (R2019a)
Instrument Control Toolbox Version 4.0 (R2019a)
Optimization Toolbox Version 8.3 (R2019a)
Parallel Computing Toolbox Version 7.0 (R2019a)
Signal Processing Toolbox Version 8.2 (R2019a)
Simulink Control Design Version 5.3 (R2019a)
Statistics and Machine Learning Toolbox Version 11.5 (R2019a)
Symbolic Math Toolbox Version 8.3 (R2019a)
According to the in-app documentation, the solve function should follow this syntax:
syms x
eqn = sin(x) == 1;
solx = solve(eqn, x)
And the expected output from this is:
solx =
pi/2
However, when I run the same commands I receive:
>> syms x
>> eqn = sin(x) == 1;
>> solx = solve(eqn, x)
solx =
x
I have tried a number of even simpler equations with the same result (receiving symbol instead of a numerical value).
What am I doing incorrectly?
Thanks in advance.
As discussed in the comments, your MATLAB installation does not seem to use the function in ...\toolbox\symbolic\symbolic\solve.m when a solve command is issued; instead, an unrelated function provided by the maple toolbox is used, leading to some confusion. This issue can be solved by reordering the MATLAB search path:
p=path();
path(p,'C:\Program Files\MATLAB\R2019a\toolbox\maple');

Installing openCV on MATLAB with mex and MinGW64

I'm trying to install OpenCV on MATLAB2015b using mexopencv. I have downloaded and successfully installed MATLAB support for MinGW-w64 C/C++ Compiler add-on in MATLAB. This is MATLAB's suggested compiler when I type mex -setup. However, when I run mexopencv.make in MATLAB, I get the following error:
Error using mexopencv.make>pkg_config (line 333)
OpenCV library path not found: D:\opencv\build\x64\mingw\lib
Error in mexopencv.make>mex_options (line 265)
[cv_cflags, cv_libs] = pkg_config(opts);
Error in mexopencv.make (line 82)
mex_flags = mex_options(opts);
I have already added mexopencv-master directory to my MATLAB's Path. And I have already checked that I have downloaded the correct version of opencv for mexopencv (which is 3.4.1 as of now).
I don't know why \build\x64\mingw\lib\ doesn't exist. I have seen different tutorials but most of them use Microsoft Visual Studio 2013/2015 C++ to compile mexopencv. How can I compile OpenCV with MinGW-w64 on my own? Or is there another github package that I should've downloaded instead of this one?
I have tried to uninstall my current version of Visual Studio and install the 2013 version to use its C/C++ compiler. However, MATLAB doesn't recognize this compiler when I issue mex -setup.
Any help is appreciated. Also, I cannot use MATLAB's computer vision toolkit because I want to use a function that is not supported by it (Namely, the probabilistic Hough transform).

how to use vision.ShapeInserter in matlab?

when I compile the command line, it is error. I do not know what is wrong? any any help. Thanks!
Create the shape inserter object.
shapeInserter = vision.ShapeInserter;
#%Read the input image.
I = imread('cameraman.tif');
#%Define the rectangle dimensions as [x y width height].
rectangle = int32([10 10 30 30]);
#%Draw the rectangle and display the result.
J = step(shapeInserter, I, rectangle);
imshow(J);
Error:
Undefined variable "vision" or function "vision.ShapeInserter".
Error in ve_hcn (line 3)
shapeInserter = vision.ShapeInserter;
ver :
MATLAB Version: 8.0.0.783 (R2012b)
MATLAB License Number: 724504
Operating System: Microsoft Windows 7 Version 6.2 (Build 9200)
Java Version: Java 1.6.0_17-b04 with Sun Microsystems Inc. Java HotSpot(TM) 64-Bit Server >VM mixed mode
------------------------------------------------------------------------------------------------------- MATLAB Version 8.0
(R2012b) Communications System Toolbox Version
5.3 (R2012b) Control System Toolbox Version 9.4 (R2012b) DSP System Toolbox
Version 8.3 (R2012b) Image Processing Toolbox
Version 8.1 (R2012b) MATLAB Compiler
Version 4.18 (R2012b) MATLAB Report Generator
Version 3.13 (R2012b) Optimization Toolbox
Version 6.2.1 (R2012b) Parallel Computing Toolbox
Version 6.1 (R2012b) Partial Differential Equation Toolbox
Version 1.1 (R2012b) Signal Processing Toolbox
Version 6.18 (R2012b) Statistics Toolbox
Version 8.1 (R2012b) Symbolic Math Toolbox
Version 5.9 (R2012b)
vision.ShapeInserter is in the Computer Vision System Toolbox, which you don't seem to have installed. In the same toolbox (since release R2013a) there is also a function insertShape, which is easier to use.

CUDA driver too old for Matlab GPU?

Ok,this is something am having problems with. I recently installed Matlab R2013a on a x86_64 Linux system running RHEL 5, attached to a Tesla S2050. I have never used the GPU functionality in Matlab itself (but have tried some of it using Jacket that lets one
program GPUs in Matlab).
The Tesla is working fine with all the drivers ,CUDA installed (Jacket v1.8.2 is running fine without complaints).
** Driver Version: 270.41.34 (the last version from 2011, supporting S2050) **
CUDA: v5.0.35
nvcc -V : Cuda compilation tools, release 5.0, V0.2.1221
But the Matlab r2013a complains:
gpuDevice errors:
Caused by:
The CUDA driver was found, but it is too old. The CUDA driver on your system supports CUDA version 4. The required CUDA version is 5 or greater.
Now, I understand the error that Matlab has problems with the Driver version. But, I have installed the latest CUDA toolkit and the latest driver that nVidia has to offer for the Tesla S2050 that I have.
Is there a later driver version available for this Tesla (i downloaded the latest driver & when trying to install, it simply complains that I don't have the compatible nVidia hardware).
How do I tell Matlab to consider the relevant CUDA ? (where to set PATH, CUDA_PATH etc., if any ? )
Are there any other checks i need to perform the evaluate the working of the attached Tesla ?
Thanks in advance for help.
You cannot use CUDA 5.0 with driver 270.41.34. CUDA 5 requires 304.54 or newer. This is not a MATLAB issue.
Newer drivers that support CUDA 5 will also support Tesla S2050.
For example this recent 319.17 driver lists Tesla S2050 on the supported products tab. Or use the 304.54 that comes with cuda 5.0.