C-compiler setup in MATLAB R2009a 64-bit version

8 次查看(过去 30 天)
I am trying to run an embedded matlab code in the 64-bit version of MATLAB R2009a and am getting a 'Make error' as shown below,
------------------------------------------------
Making simulation target "gammatoneFilter_sfun", ...
D:\00_Project\Matlab\Moi\v6\slprj\_sfprj\gammatoneFilter\_self\sfun\src>"d:\program files\matlab\r2009a\sys\lcc\bin\lccmake" -f gammatoneFilter_sfun.lmk The system cannot find the path specified.
---------------------------------------------
I understand this is be because the compiler is not installed using the 'mex -setup' command but on doing so unlike the 32-bit version there are no compilers listed to install.
1) I have both the 32 & 64 bit versions installed in D-drive and in separate folders D:/Program Files/Matlab_64bit & D:/Program Files(x86)/Matlab_32bit. Is this causing any problem?
2) Am I missing any package that helps install the 64-bit version of lcc/gcc? If so which one and where can I find it?
3) Since I received 'Simulink memory allocation error' when running the code in 32-bit version, I am trying to run the code in the 64-bit version. Is this right way? or should I write a better code & run it in 32-bit version?
Thanks in advance

采纳的回答

Kaustubha Govind
Kaustubha Govind 2011-9-19
编辑:John Kelly 2014-6-12
I am not all too familiar with the Simulink memory allocation error (perhaps your model deals with large amounts of memory?), but I think attempting to run the model on 64-bit is definitely worth a try.
The free LCC compiler that 32-bit MATLAB ships is a 32-bit compiler only, and cannot generate 64-bit binaries - this is why 64-bit MATLAB does not ship with it. You can install MSVC 2008 Express which is a free compiler and is supported with R2009a (see full list here http://www.mathworks.com/support/compilers ). Please pay special attention to footnote#6 on the same page, to ensure that you install x64 compilers for MSVC 2008.
Once you have installed the compiler, run "mex -setup" and run your model again.
  1 个评论
Rajaram B S R
Rajaram B S R 2011-9-20
Thank you very much for helping me out here. I did the installation and could list the compiler in the 64-bit version setup.
But there is a small problem, as I would be using the analog input block in my previous block which needs the data acquisition toolbox from the 32-bit version, I could not go ahead with this. Thanks anyways for the info.

请先登录,再进行评论。

更多回答(1 个)

saikiran Puranam
saikiran Puranam 2020-4-20
%% Startup and Globals
clear all
clc
%% Filter Parameters
width = 3840;
height = 2160;
n = 1000;
sig = 5;
% Read in the image
A = imread('canyon.jpg');
% Convert it to grayscale to make things slightly simpler
A = rgb2gray(A);
% Display it.
imshow(A);
% Convert the image to floating point numbers
A = double(A);
% Create a gaussian kernel (similar to a sinc wave in 2D, gives us
% lowpass characteristics
H = fspecial('gaussian',n, sig);
% Do the filtering via direct convolution (and time it with tic/toc)
tic
A_conv = conv2(A,H,'same');
toc
% Display the result
figure;
imshow(A_conv, []);
%% FFT Convolution
% Dot he filterting via FFT convolution (and time it with tic/toc)
tic
A_freq = fft2(A,height+n-1,width+n-1);
H_freq = fft2(H,height+n-1,width+n-1);
Out_freq = A_freq.*H_freq;
Out = ifft2(Out_freq);
toc
% Display the result
figure;
imshow(Out,[]);

类别

Help CenterFile Exchange 中查找有关 Communications Toolbox 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by