MATLAB algorithm to MATLAB function code or C code
Can any body help me write this below code into MATLAB object oriented code or C code form please?
M=50; % total number of periods. (choose for 1s duration)
f0 = 50; % fundamental AC frequency
T0 = 1/f0; %fundamental AC period
T = M*T0; %Time for M periods (integer M)
N=30; % sample points per period.
dt = T0/N; % Sample at N points per period (integer N > 20)
t = dt*[1:M*N-1]; % Sampling time array
A0=120/2; % amplitude of AC signal. Divide by 2 or maybe sqrt (2) ?
AC=A0*sin(f0*t*2*pi); % create AC signal.
DC0=50; % DC amplitude
DC=DC0*ones(1,le...converting c++ code to Matlab code using Matlab 9
im working on a project using matlab. i want to use some of the already writen codes in C++. i want to use these codes in my project rather than writing them from scratch. is there some way or a chunk of code that might convert C++ code to matlab code or a ".c" file to ".m" file. please if anyone knows do let me know at the earliest.thanks
"fatima " <email@example.com> wrote in message <firstname.lastname@example.org>...
> im working on a project using matlab. i want to use some of the already writen codes in C++. i want to use these c...Run a Matlab code without matlab
I've programmed a matlab code and i want to use it on my home
computer. The problem is that matlab isn't installed. Is there any
possibility to run a matlab code without matlab?
> Is there any possibility to run a matlab code without matlab...
ugarcia <email@example.com> wrote in message <firstname.lastname@example.org>...
> I've programmed a matlab code and i want to use it on my home
> computer. The problem is that matlab isn't installed. Is there any
> possibility...Run MATLAB code without MATLAB
I'm interested in running MATLAB code without having MATLAB
installed. Particularly, I'd be interested in being able to
call MATLAB code from Java (!!) or C (less desirable),
because if I say, make some application that uses MATLAB
code, then I don't wanna require users who download it to
have MATLAB installed. What is the best route to take with
this? Is it possible to simply interface MATLAB code from
On Jan 17, 12:32 pm, "Rob B" <rrbramb...@gmail.com> wrote:
> I'm interested in running MATLAB code without having MATLAB
> installed. Particu...'Matlab Code' to 'Embedded Matlab fun code'
I have a Matlab code to process a pure analog signal 'u'. Now I want to implement it in Simulink and I want to use it in 'Embedded Matlab fun block' so i need to transform 'Matlab code' to 'Embedded Matlab fun code' to perform the task.
The Matlab code is as follows:
u_abs = abs(u);
major_th = 1.5e-1;
minor_th = 1.8e-2;
major_peak_value = ;
minor_peak_value = ;
pos = 1;
pos_max = 1;
[m pos_max(end+1)] = max( u_abs( pos : pos + 10) );
pos...re:request for matlab code-3D spiht image compression MATLAB CODE
This is praneeth doing my final year request you send me the
amtlab code for the project titled '3D spiht image compression '.
I like to do this project and working for it .Please make sure
that it is posted as earlier as possible.
This is not a place to come and request people to do your work for you.
...From Matlab neural network toolbox to matlab code
I have been working with neural network toolbox in matlab 7 for the calibration and validation optimization problems. but i wanna to do it with matlab code. is it possible to transform the things that happen in toolbox, training process and adapting outputs get via code.. is there anyone who transform the things happen in toolbox to codes.
"murat " <email@example.com> wrote in message <firstname.lastname@example.org>...
> Hi All,
> I have been working with neural network toolbox in matlab 7 for the calibration and validation optimization...Codes are all shown in the matlab window when running matlab
I am using matlab 6.5.0.
Today, when I wrote some codes in the M-editor and run by using F5,
all contents of the codes appear in the main matlab window. This is
quite strange and never happened before.
I tried to shorten the codes and run some simple test. Still the
same. So it has nothing to do with what I wrote in the program.
I suspect that I turned on some setting in matlab without realizing
it. Anyone can give a hint on how to turn this display off?
You probably turned echo on.
Try echo off all
Or go to File -> Preferences -> Command Window and uncheck Echo on
P...code of matlab 7a not working in matlab 2009
I wrote a code in matlab 7a andand it was working over there
then i changed computer which was having matlab realease 2009a and it is not working
If i install Matlab 7 release 14, will my code work again thanks
"moonman" wrote in message <email@example.com>...
> I wrote a code in matlab 7a andand it was working over there
> then i changed computer which was having matlab realease 2009a and it is not working
> If i install Matlab 7 release 14, will my code work again thanks
Can you be more specific about the fact that your code is not working in...[Ann] Matlab Snippets : now with matlab code coloring
My Matlab Snippets website has been upgraded with code coloring ( syntax
Now when you enter matlab code into snippets the resulting web page is
beautifully highlighted. Have a look at
for many examples.
Share Matlab Code Snippets Online
I've added a new service to my web site. A Matlab Code Colorer or syntax
highlighter. You can access the service here
Just enter any matlab code and press th...Is the matlab compiler faster than just running your code in Matlab?
I made a very complicated orbit model for calculating the error motion of a spindle. If run my program it takes several days to end the calculation. I optimized my code using the profiler. However, my calculation still takes some days....
If I use the Matlab compiler (.exe) for my calculations, will this save a lot of calculation time compared with running my program just in Matlab?
Any suggestion is welcome!
"Hermano Cappa" wrote in message <firstname.lastname@example.org>...
> If I use the Matlab compiler (.exe) for my calculations, will this save a lot ...Run Matlab ... from Matlab
Is there any limitation to run Matlab from Matlab, as a system command, on Linux platforms ?
I tried to start Matlab, both using the ! syntax (!matlab&) or the system command (system('matlab&')), the Matlab splash screen appears, but the new Matlab session closes rapidly .
When I do the same with a script of mine (system('matlab -r "myscript"&')), my script is being executed, but Matlab finally crashes .
If I remove the &, it works well, but the first Matlab session is blocked till I close the second one .
I run Matlab on a Linux 64bits pla...Call C code from Matlab -> Matlab crash
I have a problem calling C code from Matlab. The mex file compilation
is ok. When I run the program Matlab (7.3) crashes. Below is the
mexFunction code. Any idea is welcome. (I think the main part of the
code (middle part) is not useful for the crash problem, but I put it
void mexFunction (int nlhs, mxArray *plhs, int nrhs, const mxArray
// Standard variables
int p,r,h,i,j,f,w; // Indices for loop
int MAX_NBM = 1000;
int MAX_DIM = 10;
in...MATLAB talking to MATLAB?
For my project, I need to have a client program (MATLAB executable) talking
to a server program (also MATLAB executable) to query data. Is there any
easy way to accomplish that?
I appreciate any help that I can get on that.
Oops, I forgot to mention. There are multiple clients querying the server,
so I guess serial objects + remote serial port wouldn't work.
"Hoi Wong" <email@example.com_> wrote in message
> For my project, I need to have a client program (MATLAB executable)
> talking to a ser...