how to convert functions of matlab such as imagesc,su​bplot,caxi​s,ylim into c++ code?

i wanna know that using which libraries of c++ or other libraries can work out. i can't use matlab compiler sdk because it needs users install MCR. Moreover,it seems matlab coder cannot support matlab graphics. so,would anyone like to tell me how to solve this? thank you.

 Accepted Answer

C++ does not define graphics.
There are a number of graphics libraries such as Direct-X or OpenGL that can be used. tkl maybe. Gtk probably. MS Windows has a graphics model. Some of these choices might require linking against extensive libraries. You need to decide which systems you are targeting and whether you need extensive font support, and whether you need 3D, or transparency, or lighting and shading, and who is going to be responsible hidden line removal, and layout management upon resizing and font changes and …

3 Comments

Thank you for your answer.Could you tell me which choice is better for me? Matlab code related to graphics is below. Matrices or arrays from matlab have been converted into C++ by hand.And I don't want users to install another software or runtime environment like MCR. My target systems is MS windows.
figure(H_figure_CC);
subplot(3,3,Cut_Number);
imagesc(CC.Data);
colormap(radarcolor_CJJ(40,1)); %产生40种颜色
caxis([ 0.6 1]);
ylim([Sphere_Distance_Cell-Sphere_Distance_Cell_Extend Sphere_Distance_Cell+Sphere_Distance_Cell_Extend])
xlim([Sphere_Center_Ray-Sphere_Azimuth_Cell_Extend Sphere_Center_Ray+Sphere_Azimuth_Cell_Extend])
xlabel('径向数目');
ylabel('距离库');
title(['第' num2str(BaseData_Select.CutNumber) '层,El=' num2str(BaseData_Select.PPI_Elevation) 'deg ,CC=' num2str(Sphere_CC) ]);
https://msdn.microsoft.com/en-us/library/windows/desktop/ee417756(v=vs.85).aspx

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!