how to understand .sc .mat in matlab
5 views (last 30 days)
Show older comments
Hello,i cant see the logic of these two lines taken from the full code shown bellow.
i know that its some how plotting an area but .mat .sc are resembling . command from c# of object oriented.
How to understand the meaning of the two lines shown bellow?
Is there any material i could use explaining examples for this structs?
lambda=633e-9;% wave length in [m]
L=0.01;% meter factor, it is defined that 1cm=1024 pixels-> the first scale will be over 1cm
scale=linspace(-L/2,L/2,n);% basic scaling vector in length of 1024.
%% Q2 creating matrix
[X, Y]= meshgrid(scale,scale);% creating the basic function. on the function we will create the images that will operated
midCirc= X.^2+Y.^2<(1/n)^2;%because we work in meter units, the 100/1024[cm] transforms into 1/1024[m]
Tshape= (abs(Y)<0.2/n)&(abs(X)<0.6/n) | ((Y<1.4/n)&(Y>0.2/n)&(abs(X)<0.2/n))
%%%% Negative cirle part
image(func_out.sc, func_out.sc, abs(func_out.mat), 'CDataMapping','scaled');
Jan on 10 Apr 2021
Edited: Jan on 10 Apr 2021
The command func_in.mat = ... creates the struct "func_in" with the field "mat". See:
A web search is a good strategy also, e.g. for "Matlab struct":
Find more on Low-Level File I/O in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!