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');
Related
I'm trying to use cplex on matlab but I'm getting the following error:
Error using cplexlp (line 256)
Invalid MEX-file 'C:\Program
Files\IBM\ILOG\CPLEX_Studio1271\cplex\matlab\x64_win64\cplexlink1271.mexw64': The specified
procedure could not be found.
Error in cplex_example (line 12)
[x,fval,exitflag,output] = cplexlp(f,A,b,Aeq,beq,lb,ub,options);
I have already added the paths as follows:
addpath ('C:\Program Files\IBM\ILOG\CPLEX_Studio1271\cplex\matlab\x64_win64')
addpath('C:\Program Files\IBM\ILOG\CPLEX_Studio1271\cplex\examples\src\matlab')
savepath
My laptop runs on Windows 10 64-bit, my matlab is R2013a 64-bit and cplex is cplex 12.7.1 win-x86-64.
I saw an answer to a similar question and they said it must be checked by dependency walker. Dependency walker showed that a whole bunch of API-MS-WIN-CORE, EVENTING, SECURITY, SERVICE, EXT-MS-WIN-GDI etc. dll files where missing.
I looked at a few posts implying that these are included in Visual C++ Redistributable packages, so I installed all editions of Microsoft Visual C++ Redistributable (both x86 and x64 just to be sure).
But I still have the problem. What am I missing here? Any help would be greatly appreciated.
MATLAB R2013a is not supported with CPLEX 12.7.1 (see the detailed system requirements). You'll either have to use a newer version of MATLAB or an older version of CPLEX.
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.
I am try to use the matlab parallel computing feature.
I first typed "ver" to check if I have already installed Parallel Computing Toolbox, it did
>> ver
----------------------------------------------------------------------------
MATLAB Version: 9.0.0.341360 (R2016a)
MATLAB License Number: 353265
Operating System: Microsoft Windows 10 Enterprise Version 10.0 (Build 10240)
Java Version: Java 1.7.0_60-b19 with Oracle Corporation Java HotSpot(TM) 64-
Bit Server VM mixed mode
----------------------------------------------------------------------------
....
Parallel Computing Toolbox Version 6.8 (R2016a)
....
So it seems that I have already installed it. But when I try to use it, it just doesn't work
>> matlabpool('open',2);
Undefined function or variable 'matlabpool'.
>> matlabpool open
Undefined function or variable 'matlabpool'.
The command (as of R2013b) is parpool to create the pool of workers.
parpool(2)
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.
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.