How can I get the C language code of the following script?

1 view (last 30 days)
A=imread('E:\Masud Kaiser\Thesis\3750400-1.jpg');
B = rgb2gray( A );
figure
surfc(B,'edgecolor','none')
grid on
rotate3d on
figure
surfc(B,'edgecolor','none')
view (0,90)
figure
surfc(B,'edgecolor','none')
view (-90,0)
figure
surfc(B,'edgecolor','none')
view (0,0)
figure
grid on
imcontour(B,3)
rotate3d on
colormap
hold

Accepted Answer

Walter Roberson
Walter Roberson on 10 Dec 2018
With difficulty. There is no code generation support for most of those graphics routines.
  2 Comments
Walter Roberson
Walter Roberson on 13 Dec 2018
Neither C nor C++ have any built in graphics . There are a number of competing graphics standards with DirectX and Opengl being perhaps the two best known (but Apple has switched to its Metal framework for higher performance.) Then there is the code for programming GPUs with Cuda programming not being compatible with OpenCL....
Thus when you ask for C code for graphics you need to ask yourself which graphics package is being targeted...

Sign in to comment.

More Answers (0)

Categories

Find more on Graphics Performance in Help Center and File Exchange

Products


Release

R2015a

Community Treasure Hunt

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

Start Hunting!