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

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.

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.

Problems with writing Transfer Functions as Rational Expressions in s

Why do I get the error:
[Undefined function 'tf' for input arguments of type 'char'.]
when I'm trying to use [s=tf('s');]?
The code worked just fine before updating my license, so I'm wondering if I missed something in the update.
Taking a look at the documentation, you see at the top left that the function tf is part of the control systems toolbox. The output of ver tells you that no toolboxes are installed or activated. If you previously had the toolbox present on the same system there is probably a license issue. Try deactivating / activating the license.

Getting error when running after simulator task in my Matlab workflow

When i am running start simulator in my Matlab workflow i am getting below error.
The mex compiler '' is not supported for simulation builds. Use 'mex -setup' to select a supported compiler.
Scenario : In my matlab project i have *.mdl files. After generated diagram fro that mdl files, i clicked on one of my scope diagram then i am getting above error
Please let me know can i need any compilers, if so tell me i will do accordingly.
Any suggestions/methods to follow get sort out from this error.
Thanks in advance for you great valuable replies.

Scicos Code generation for rt_preempt system

Due to http://hart.sourceforge.net/, code generation should work for rt_preempt kernels, when using scilab 5.3.2 and hart toolsbox.
I installed both on ubuntu 12.04 LTS sucessfully, but I'm kind of lost with the code generation. I use one of the hart toolbox examples (realtime_demo), and try to compile and generate code.
First off all: Are these samples supposed to work with rt_preempt or only with RTAI? what code generation commands do I have to use for rt_preempt kernels?
If anybody managed code generation for rt_preempt kernels, I would aapreciate every hint I can get!
Code generation for rt_preempt is automatically enabled, if the hart-toolbox did not detect RTAI during installation. Thus, if you don't have RTAI, by compiling your schematic you should get code that runs using rt_preemption (if this is also not available, then your code will run as a normal Linux process). However at the moment there is no way to get data in or out of the real-time process, as the RTAI scopes, meters can not be used. To overcome this communication issue and also other limitations of Xcos concerning the implementation of real-time systems, you could also have a look at OpenRTDynamics as an alternative.

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.