'Symbolic Math Toolbox' functions exist in MATLAB but not in the documentation - matlab

This problem may seem a bit weird; please bear with me.
When I try to access any function in the 'Symbolic Math Toolbox' in MATLAB, such as help ztrans or help laplace, I get the following kind of message
ztrans not found.
Use the Help browser Search tab to search the documentation, or
type "help help" for help command options, such as help for methods.
However, the toolbox seems to be installed when I try the ver or pathtool command.
Moreover, when I try some simple code such as:
>> syms k x
>> f = sin(k);
>> ztrans(f, k, x)
the code works fine and on trying the help command again, they seem to work fine as well. However, the problem again arises when I close and reopen MATLAB.
I found a few instances of other users facing similar problems on the Mathworks portal, but none of them seemed to provide any concrete solutions. Some of them seem to blame it on MATLAB hashing the tollbox incorrectly, so I tried the rehash toolbox command as well, but had no luck.
I'm not sure if this problem is just for this particular toolbox or not, but the other toolboxes I use at least seem to work fine.
EDIT-I
I also realised that the documentation is always available when I take Help --> Product Help from the menu-bar, though it is not available in the function browser even after I try the sample code.
EDIT-II
>> license('checkout','Symbolic_Toolbox')
gives me
ans =
1
I'm not working on a student license either.

It could be a license issue. Try to get further information with:
license('inuse')
If you have a Student version, some functions cannot be executed.
istudent
In case that you are in an office/university, and you have floating licenses. Be sure to check-out all the licenses before running your code.
license('checkout','toolbox_name')

Related

What version of Matlab should I install to make dsearch() work?

I have a code in MATLAB that I need to run once to get some quick reference results. This code uses dsearch(), and I relized that this function has become deprecated and has been substituted by dsearchn(). I tried to follow some suggestions to make it work but I didn't succeed (it's my absolute first time with MATLAB) and I just need to run this code once to get some numbers. Which MATLAB versione should I install to make it work?
dsearch was removed in MATLAB R2012a, therefore you may use any version of MATLAB before R2012a.
If you have an active MathWorks account, you may access the documentation archive here.
According to MathWork's release notes, this function started printing a warning on release 2010a. So you should be fine either using it or a previous version.

Matlab rfplot not working

I'm trying to plot the S-Parameters in a file .s4p using the RFtoolbox but it seams that the function that I need rfplot doesn't work.
I searched which rfplot to see if the function exsits, and it is, but it's empty. I opened and inside I have this line:
narginchk(1,Inf)
error(message('MATLAB:UndefinedFunctionTextInputArgumentsType','rfplot',class(varargin{1})))
I tried also with other versions of Matlab (I have R2017a) where I work, but everyone have this kind of function.
Do you know why? Al the other functions of RFtoolbox work perfectly. How can I solve it if this problem is not related to my version?
The function exist, and the code exist too, but its hidden. Its a MATLAB proprietary code and they do not want you to know the real code behind it, so you can not see it.

Cannot use some Matlab MPC Toolbox functions

I'm trying to use for example setoutdist Matlab function from the MPC Toolbox (I'm using Matlab R2013a on Windows 8.1). As a response I'm receiving:
Undefined function 'setoutdist' for input arguments of type 'ss'.
I am able to get help about this function using help setoutdist. When I'm typing the function name and left parenthesis I'm receiving prompt with list of the arguments. When I'm using which setoutdist -all I'm receiving proper output:
C:\Program Files\MATLAB\R2013a\toolbox\mpc\mpc\#mpc\setoutdist.m % mpc method code here
But the function doesn't work even in default Matlab path, so I don't think it is shadowed.
The same is with the other functions, for example setindist, setestim, mpc_struct, etc. but mpc, mpcstate and mpcmove functions works correctly.
I was trying: clear all, clear classess, rehash toolbox, rehash pathreset, rehash toolboxreset, restoring default paths using pathtool. I've blocked the antivirus and added exeptions to it's list. I've even reinstalled my Matlab, nothing helped.
Maybe this is significant: when I'm trying to edit the setoutdist.m I'm receiving message that access is denied.
I will extremly appreciate any help...
How are you calling setoutdist? The correct syntax is one of the three (see documentation - for R2014b):
setoutdist(MPCobj,'integrators')
setoutdist(MPCobj,'remove',channels)
setoutdist(MPCobj,'model',model)
where MPCobj is a Model Predictive Controller object, created for example with the mpc function. It looks like from the error message that you are calling the function with a state-space object, which is not allowed (I'm guessing).

Some problems about the mexLasso function

I am a student who is envolving in a research about robust visual tracking.
And these days ,I had met a problem in my study.
The teacher gave me a project of matlab code about the research, when I try to run this code, and the program error is as follows:
??? Attempt to execute SCRIPT mexLasso as a function:
F:\L1_Tracking_standard_car\mexLasso.m
Error in ==> L1Tracking_release at 95
c = mexLasso(Y(:,i), [A fixT], param);
Error in ==> demo at 46
tracking_res = L1Tracking_release( s_frames, sz_T, n_sample, init_pos,
res_path, fcdatapts);
When I go to the program tracking, I found that mexLasso function does not exist, Only get an empty mexLasso.m file and a mexLasso.mexw32 files.
My OS version is Windows 7 64bit,and the matlab is matlab 7.12.0 r2011a
Does anybody here knows the causes of my problem?
Anymore, I wonder if anybody knows who has the source code of the binary file mexLasso.mexw32.Because I thought that if I can get the source code of the file mexLasso.mexw32,then I could compile its 64 bit version myself.(I doubt that my os could not recognize the .mexw32 file.)
I hope my express clear enough to let you come to help me ,thanks a lot!
I think your analysis is basically correct - mexLasso is intended to be a MEX function, but MATLAB is finding only mexLasso.m which presumably contains help text. Unfortunately, the error you're getting isn't terribly helpful. As I see it, you have two options:
Obtain the source code for mexLasso and recompile on WIN64
Run the WIN32 version of MATLAB on your WIN64 machine
the function mexLasso comes from the SPAMS toolbox
http://www.di.ens.fr/willow/SPAMS/.
You can find the sources there and compile the mex file corresponding to your OS.
First, you need to find mexLasso.cpp file in http://spams-devel.gforge.inria.fr/downloads.html as Marial has already mentioned.
Then you can find and download the recent version of SPAMS.
A following stage is just to execute compile.m file on your MATLAB.
Finally you can find mexLasso.mexw64 in the build folder.
Good luck.

Failed to find library 'powerlib' matlab. Simulink program executing

When I tried to run a Simulink program under my R2009a Matlab, it showed an error message as follows: Failed to find library 'powerlib' referenced by 'dcmotor_openloop/Armature Current '. This library must be on your MATLAB path.
I'm wondering where I can find this powerlib.
As #Edric mentioned, powerlib is built into SimPowerSystems. The error you see can thus have two causes
(1) There is no installation of SimPowerSystems in your copy of Matlab. Type ver at the command prompt to check for what toolboxes you have installed. If SimPowerSystems doesn't show up in the list, you will have to get the toolbox, otherwise you won't be able to run the model.
(2) Your installation of SimPowerSystems is somehow corrupt. This has never happened to me in Matlab so far, but with modern technology, anything is possible. A fresh install should solve this.
powerlib is a Simulink library shipped as part of SimPowerSystems, see the product page here: http://www.mathworks.com/products/simpower/.
This should really be a comment on another answer, but I can't comment due to reputation.
From at least R2016b, perhaps earlier too, It's no longer called SimPowerSystems. It's now SimscapePowerSystems. You need that plus the bare Simscape package installed.