Shall i use the misrosoft Visual c++ code from a m-file generated from matlab in Visual C++ with out matlab runtime environment
...Matlab engine with matlab R2010b
I'm working with an aplication that use the matlab engine. I made the C++ program and it is working well in my pc with matlab 2007b, but the same very basic program shows an error when I tried to compile it in a pc with matlab R2010b. The error is about the icuuc32.dll. ¿Why is asking this DLL? How can I solve this?. Thanks¡
...matlab and c#
can anyone tell me how to connect between matlab and c#? is it using
COM? or how? and it is done in c# or matlab or both?
can anybody help me pls
Search for "c sharp" on the MathWorks support page.
"victor hugo" <firstname.lastname@example.org> wrote in message
> can anyone tell me how to connect between matlab and c#? is it using
> COM? or how? and it is done in c# or matlab or both?
> can anybody help me pls
...US-MA-Natick: Developer, C++, C, XML, Java, MATLAB, Simulink, CAD tools; C-P (45307257608)
US-MA-Natick: Developer, C++, C, XML, Java, MATLAB, Simulink, CAD tools; C-P (45307257608)
Location: Natick MA
Skills: 3+yrs of software engineering with strong C++, C, XML, and Java
Experience with MATLAB and Simulink.
Knowledge in simulation algorithms and engineering systems.
Experience with engineering simulation and CAD tools
Please send your current resume in confidence to <email@example.com>
...QR Decomp RLS
Anyone know where I might find this?
Simon Haykins Book "Adaptive Filter Theory" comes with qrdrls matlab
code on the CD.
M. Wirtzfeld wrote:
> Anyone know where I might find this?
...QR Decomp RLS
Anyone know where I might find this?
...Exporting data from C++ to Matlab --> using pointers in c++ instead of...
If i have:
//option 1 - it doesn't work
nou = (float *) calloc(50, sizeof(float));
//option 2 - it works
How can I send "nou" to Matlab if it's a pointer (option 1)??? -
option 2 works with the code:
I'm using this code:
mxArray *TxNou = NULL;
TxNou = mxCreateNumericMatrix(1, 15, mxSINGLE_CLASS, mxREAL);
memcpy((void *)mxGetPr(TxNou), (void *)nou, sizeof(nou));
I don't know what changes I have to do in the code - i've tried a lot
of things... i don't find the error!
Thanks for your advice,
Oscar Esteve wrote:
> If i have:
> //option 1 - it doesn't work
> float *nou;
> nou = (float *) calloc(50, sizeof(float));
> //option 2 - it works
> float nou;
> How can I send "nou" to Matlab if it's a pointer (option 1)??? -
> option 2 works with the code:
> I'm using this code:
> mxArray *TxNou = NULL;
> TxNou = mxCreateNumericMatrix(1, 15, mxSINGLE_CLASS, mxREAL);
> memcpy((void *)mxGetPr(TxNou), (void *)nou, sizeof(nou));
Why not use mxGetData and avoid the cast?
in option 1:
sizeof(nou) = sizeof(float *) = 4 on 32 bit, 8 on 64bit.
In option 2:
sizeof(nou) = 15*sizeof(float) = 15*4 = 60
> matlab.PutVariable("TxNou", TxNou);
> I don'...Contribute to MATLAB Central and Win a MATLAB Jacket
Many of you who post to this newsgroup are also regular contributors
to the MATLAB Central File Exchange. Look for your favorite
contributors on our File Exchange Author Profile page. You can read
their profiles and see pictures:
In a random drawing, we recently awarded MATLAB jackets to three File
Exchange authors with profile pages: Michele Giugliano, Andrey Egin,
and Denis Gilbert.
You can win a jacket, too. Just submit a new file to the File
Exchange or update your author profile by December 2003 for a chance
to win one of four MATLAB jackets. See the jacket below:
Here are some interesting File Exchange facts:
- Since its inception in 2001, visitors have downloaded more than
1.25 million submissions from the File Exchange.
- In September 2003 alone, visitors downloaded 80,085 files, an
average of 2670 a day!
.... what if the prize was a free copy of the next version of Matlab :-)
Min Poh wrote:
....or an offer for employment...
"bourassa" <firstname.lastname@example.org> wrote in message
> ... what if the prize was a free copy of the next version of Matlab :-)
> Min Poh wrote:
...matlab Question #12
Implement the statistical edge detection filter  (attached) in MATLAB and
choose a 7×7 mask and implement the F and T tests. Then present a range of
images to the filter and display the filtered images. Histogram equalization
should be applied to the implementation. Different masks should be use to
compare the outcome.
• Implement non-maximal suppression in the edge detection to sharpen up the
• Implement a different size of mask and also compare the performance of this
algorithm with the Canny edge detector on the same images, drawing conclusions
about their relative performance on noisy, clean, textured and cluttered images.
A A 0 B B
A A 0 B B
A A P B B
A A 0 B B
A A 0 B B
Figure.1: 135o mask
0 B B B B
A 0 B B B
A A P B B
A A A 0 B
A A A A 0
figure.2: 135o mask
Figures 1and 2 are examples of a 90o 135o masks, where the two regions for each
masks are denoted by A and B, the pixel of interest is denoted by P and the 0’s
denoting the separating line between the two masks (these pixels are ignored during the calculations). You should generate other masks for 0o, 45o etc.
Once you have generated these masks within MATLAB, you need to scan the masks
through the image and read the pixels by its two areas and then calculate statistical
parameters (standard deviations and variations) of regions A and B using the var ( )
function in MATLAB.
The next step will be implementing ...Matlab parallel for loop or Matlab open pool
I am trying to to some computations and I would like to do it in parallel using parfor or by Opening the matlabpool.. as the current implementations is too slow:
for i = 1:length(vector1) % length is 25
for j = 1:length(vector2) % length is 16000
temp1 = vector1(i);
temp2 = vector2(j);
t1 = load(matfiles1(temp1).name) %load image1 from matfile1
t2 = load(matfiles2(temp2).name) % load image2 from matfile2
It work fine but I would really like to know if there is a way to speed thing up ... Thanks a lot in advance!
...MATLAB /SIMULINK question
I would like to ask how do i read the spectrum scope output in simulink
its y axis is in dB from 0 to -100 and x axis from 0 to 0.5 in Hz.
I find it weird since my filter response is surpossed to at much higher freq
but the output on scope shows response within range of 0 to 0.5 on x axis in
units of Hz
On 22 Mar, 08:03, "Bryan" <s...@xilinx.com> wrote:
> I would like to ask how do i read the spectrum scope output in simulink
> its y axis is in dB from 0 to -100 and x axis from 0 to 0.5 in Hz.
> I find it weird since my filter response is surpossed to at much higher freq
> but the output on scope shows response within range of 0 to 0.5 on x axis in
> units of Hz
Seems to me that the sampling frequency hasn't been set?
If you don't set it yurself, a good implementation of an
analyzer will use a default value instead. Fs = 1 Hz is
a natural choise for such a default value.
...matlab output question
I have a matlab question:
Suppose I want to output to a file with the following format:
"190" r2pos "219"
"193" r2pos "220"
"202" r2pos "203"
"205" r2pos "216"
"207" r2pos "226"
"229" r2pos "230"
"236" r2pos "237"
The two columns of numbers are recorded in the variables x and y. I
use fprintf but can not get the " symbol in the file. Does any body
know how to do this?
try this :
fprintf('"%d" r2pos "%d"',x,y)
Thus spake <Jane>:
> I have a matlab question:
> Suppose I want to output to a file with the following format:
> "190" r2pos "219"
> "193" r2pos "220"
> "202" r2pos "203"
> "205" r2pos "216"
> "207" r2pos "226"
> "229" r2pos "230"
> "236" r2pos "237"
> The two columns of numbers are recorded in the variables x and y. I
> use fprintf but can not get the " symbol in the file. Does any body
> know how to do this?
tmpl=['"' '%d' '"' ' r2pos "' '%d' '"\n' ];
A: Because it messes up the ord...Convertion from Matlab to C++
My question is it possible to convert matlab code to C++? If yes,
how we can convert matlab code and files to C++?
Thank you very much.
On 5/23/2012 3:09 AM, Fatiha wrote:
> My question is it possible to convert matlab code to C++? If yes,
> how we can convert matlab code and files to C++?
> Thank you very much.
...a question about fft in matlab
This may be a simple question for some of you but I am confused and
will really appreciate your help.
I have a semi circular 1D signal (assuming all values outside the
circular diameter are 0). I want to recover the width of the signal
from the Fourier transform of the signal by looking at the zero
I create the signal as follows:
radius = 20;
icenter = 100;
length = 200;
x = linspace(-icenter/2, icenter/2, length);
for i = 1:length
f(i) = 2*sqrt(r^2 - x(i)^2);
So, I get a semi-circular signal f( ).
Now, I do a FFT of f( )
F = fft(f);
My question is how can I use the first zero crossing of F and recover
the "value of the radius" of the original circular signal?
secondly, Is there any way by which I can calculate the zero crossing
of F (above) automatically in matlab?
The FFT has the form (2 * pi * JI (w * radius))/ (w * radius).
thank you in advance.
On 3 Mar 2006 19:44:02 -0800, "email@example.com" <firstname.lastname@example.org>
>This may be a simple question for some of you but I am confused and
>will really appreciate your help.
>The FFT has the form (2 * pi * JI (w * radius))/ (w * radius).
>thank you in advance.
what does the "JI" mean in your
above FFT expression?
You said you "want to recover the width of the signal
from the Fourier transform". Wouldn't it be
easier to measure the width of your 1D signal
(the diameter...Linking C++ with Matlab
I have two sensors, a pressure sensor and a k-type thermocouple. I'm trying to read them into Matlab so that I can create a stripchart and do some analysis. My plan is to obtain the data using a 'Measurement Computing USB-1208LS'.
This instrument comes with some data aquisition software written in C. I'm currently trying to write a C++ project in Visual C++ 2010 Express that allows me to grab the data in Matlab, using the tutorial I downloaded from www.engineering.uiowa.edu/~dip/lecture/C++_with_Matlab.pdf as a guide, although this is for an earlier version of Visual Studio.
I got the basic structure to compile, but as soon as I tried using any of the mex functions it would no longer compile and I get the following error message
mexFunction.obj : error LNK2019: unresolved external symbol _mxCreateDoubleScalar referenced in function _mexFunction
I assume that means that it can't 'see' the mex libraries, but I can't work out why. Up until a week ago I knew nothing about c++, so I'm currently on a very steep learning curve.
Are there any obvious things I should be looking for? Would anyone be willing to look over my code and check my settings if I were to email them the project?
"Jane T" wrote in message <email@example.com>...
> I have two sensors, a pressure sensor and a k-type thermocouple. I'm trying to read them into Matlab so that I...Matlab and C++ in LABVIEW
Plz help me out that how can i implement Matlab code in LABVIEW.i am using matlab 7.0 and LABVIEW 7.1.
is there any method so that i dont have to change the Matlab code and it runs in LABVIEW.
secondly can i run a C++ code in formula node exactly as it runs in C++ compiler
thnx for ur time
In version 7 and 7.1, LabVIEW have the "MATLAB Script Node" that allows you to run m-scripts from within LabVIEW. Since you have communication between both products, minimal change (if any) is necessary, but you have to have both produts installed on the same machine for this interface to work. In LabVIEW 8.20, NI introduced the Mathscript node and this requirement is not necessary. Please look into this site: <a href="http://www.ni.com/labview/mathscript.htm" target="_blank">http://www.ni.com/labview/mathscript.htm</a> to learn more about mathscript node.
In the formula node, you can use C-like convension to develop your equations. However, you can't use object-oriented programming in there. So, you need to remove the objects from the formula and use stricted types. You should be able to obtain more information in the help of the Formula Node.
Hope this helps.
...US-TX-Austin: Signal Processing Eng., C/C++, Matlab, Verilog, algorithm devel.; (45345932412)
US-TX-Austin: Signal Processing Eng., C/C++, Matlab, Verilog, algorithm devel.; (45345932412)
Position: Signal Processing Eng.
Location: Austin TX
Skills: 6 years of total industry experience or greater
An in-depth knowledge of signal processing algorithm
A solid understanding of C/C++ and Matlab
A solid understanding of Verilog or similar language
Prior experience in a communications or related IC
Knowledgeable with standard IC design tool flows
Wireless LAN or OFDM algorithm experience
Excellent communication skills
Scope: Signal processing design engineer. Activities include
algorithm development and implementation in both RTL and
firmware for wireless communications ASICs.
Actively participating in the definition and implementation
of communication ASICs
Implementation and debug
Please send your current resume in confidence to <firstname.lastname@example.org>
...Need help for a matlab mini project
I have a matlab in class exercise due in few days.
I am new to matlab and the instructions provided with the assignment is minimal.
Can Someone help me with the basic understanding as in how can I map the problem's solution to matlab script ?
I am not able to post question here as it is a jpeg file.
Please let me know and then we can discuss further.
...Call Matlab m-file from Matlab Scrip Node
My problem with matlab script node is related to calling function in matlab. I created an m-file function that takes an imput temperature (from DAQ) and defines a material property. My matlab script node doesn't seem to recognize my function. I have placed the function in the folder the vi is currently located, but it doesn't read it. How do I get matlab script node to read the functions I create in matlab?
Add the directory to matlab path, or call the .m file with it full name ( D:\..... \myfile.m)
Let me clarify,
I have pasted my matlab code into the matlab scrip node.
In this code, I have called a subfunction that I have created.
k_c is a subfunction I have created.
How do I get my code in the node to sucessfully read the subfunction k_c?
As indicated, you need to add the directory where the .m file containing the function resides to the list of paths that are read in. This is your startup.m file. The other option is to do a "cd" command prior to calling your function to change to the directory where the .m file containing the function resides.
Thanks for reiterating the information. My matlab script node is working properly. I had never used the "cd" command in matlab. I always set the working directory when I open the program, and put all the m files into t...Matlab legend with subplot question
I have a plot of 2x3 subplots. I need to get the legend from the second subplot (which pertains to the entire plot) above it, so it would actually be a 3x3 subplot space:
s = subplot, L = legend
Thanks very much!
On 5/30/2012 10:39 AM, Paul wrote:
> I have a plot of 2x3 subplots. I need to get the legend from the second
> subplot (which pertains to the entire plot) above it, so it would
> actually be a 3x3 subplot space:
> L SSS
> s = subplot, L = legend
Me no follow...
Try sample code that demonstrates what you got and then what you want
...Using matlab dll in c#
Does anyone now where I can found example code on how to use dll
objects (created in Matlab) in .NET Visual C#
Jakes Windell wrote:
> Does anyone now where I can found example code on how to use dll
> objects (created in Matlab) in .NET Visual C#
read the part about "access with dll"
Below is an example that works for calling a MATLAB Compiler 4.0 (R14)
generated DLL from C#...
Copy the following code and save it as timestwo.m:
function y = timestwo(x)
y = 2*x;
This function multiples the input by two and then displays a line plot.
Now execute "mbuild -setup" and select your Microsoft compiler. Generate
the shared library by executing:
mcc -B csharedlib:libtimestwo timestwo.m
Note that, in order to call the generated DLL, the DLL must reside either in
the same directory as your executable or in a directory on your system path.
For help in how to modify the system path, see:
Also, if you move the generated DLL to another directory, be sure to also
move the associated CTF-file to the same directory.
Open Microsoft Visual Studio .NET. Select File->New->Project. Then select
Visual C# Applications in the left pane and Console Application in the right
pane. Click OK and some automatically generated code will appear. Replace
this code with:
using Syst...Some basic questions about MATLAB operation
Hi, I have recently started using MATLAB for a DSP and a
Communication Theory class. I have some questions about how MATLAB
does some things.
1. To plot a graph, say a sinusoid, I always do this:
What does MATLAB do to generate the data for the points that are not
in increments of .1? for example sin(1.13)? Does it interpolate to
generate the graph? Is this sinusoid only valid for .1 increments? In
fact, a function in MATLAB is inherently discrete, but we use it to
model continuous functions (its 'domain' is actually only 101
2. I'm having trouble mixing up the indices of the array (1..101 for
t matrix) and the actual values (t(1)=0 t(1)=0.1, etc.)I am doing a
lot of shifting of functions (such as f(x) = x -> f(x-2) = x-2)
and this is messing me up, I usually get the error, "indices must be
positive or logicals.." Mathematically, it makes sense to compute
f(x(1)-2) for x(1)=1, but it doesn't make sense in MATLAB to ask for
f(-1). This brings me to the question of what is a reasonable matrix
size for x. -100:.1:100 ? Does it depend on the precision you need?
Is there a 'convention' used to model functions?
3. I had a misconception that MATLAB was very close to mathematical
notation. In fact, you have to interpret a lot when using it, often
going back to the theory to make sure computations make sense. So am
I using it the 'right' way. Usually only crunching huge amounts of
I know...C#? and Matlab? which one has future?
Previously, much of the reason I use matlab is because of its
graphics capabilities. The microsoft visual studio and C# (GDI+ in
particular) language change the situation gradually. I spent a lot of
time try to take advantage of both and tried very hard to combine
them together using Matlab's COM builder. Eventually, I give up.
After undersdanding more about C# framework, I found that C# and GDI+
provide tools I need to create any type of graphics and charts very
easily. The DataGridView combinining with GDI+'s graphics capability
applow me to create spreadsheet-like application, which is very hard
to be achieved using matlab. In particular, after reading two useful
books "Professional C# - Graphics with GDI+" (for brief discusion,
see for xample: <http://www.codeproject.com/books/1861004990.asp)>
nd "C# CHarts and Graphics" (see sample chapters from
publishing.unicadinc.com), now i can create any kind of matlab chart
or graphics using C#. and have much more flexibility than using
Now I switch to C# total and don't want to touch matlab anymore (even
though i have used matlab for many years). I don't see matlab's
Mike <email@example.com> wrote in news:ef52d21.-1
> Previously, much of the reason I use matlab is because of its
> graphics capabilities. The microsoft visual studio and C# (GDI+ in
> particular) language change the situation gradually. I spent a lot of
> t...Matlab COM interface from C++
Has anybody managed to connect to the Matlab COM interface directly from
C++? Not just the "Matlab Engine", which can't be opened in "desktop" mode
with full debugging. I need the debugging features and it appears the only
way to get them is to go directly in through the COM interface.
If so, can I get a copy of the relevant code that connects, shoves data to
and fro, and executes a command? Thanks in advance.
Additionally, has anybody managed to dump out the routines and calling
sequences available through the COM interface? That would be a good start.
James A. (Andy) Moorer
Adobe Systems, Incorporated
On Thu, 02 Oct 2008 01:11:22 GMT, "James A. \(Andy\) Moorer"
>Has anybody managed to connect to the Matlab COM interface directly from
>C++? Not just the "Matlab Engine", which can't be opened in "desktop" mode
>with full debugging. I need the debugging features and it appears the only
>way to get them is to go directly in through the COM interface.
>If so, can I get a copy of the relevant code that connects, shoves data to
>and fro, and executes a command? Thanks in advance.
>Additionally, has anybody managed to dump out the routines and calling
>sequences available through the COM interface? That would be a good start.
It's been a while (as in Matlab 6.5.1) but I have connected C++ code
to Matlab us...