a = struct('b', 0, 'c', 'test') b = a.b c = a.c |
Ball = struct('mass',{},'position',{},'velocity',{},'radius',{}); |
BALL(1) = struct('mass',10,... 'position',[0 0 100],... 'velocity',[0 0 0],... 'radius', 3); |
stocks=struct('name',{'GOOG','AAPL'},'full',... {'Google Inc.','Apple Inc'},... 'value',{522.35,278.64},'quant',200) stocks(2).full |
data.x = linspace(0,2*pi); data.y = sin(data.x); data data.x data.y |
patient(1).name = 'John Doe'; patient(1).billing = 127.00; patient(1).test = [79, 75, 73; 180, 178, 177.5; 220, 210, 205]; patient |
patient(2).name = 'Ann Lane'; patient(2).billing = 28.50; patient(2).test = [68, 70, 68; 118, 118, 119; 172, 170, 169]; patient |
patient(3).name = 'New Name'; patient(3) |
amount_due = patient(1).billing |
bar(patient(1).test) title(['Test Results for ', patient(1).name]) |
people(1).name = 'john'; people(1).job = 'manager'; people(1).id = 123456; people(2).name = 'mary'; people(2).job = 'owner'; people(2).id = 567890; people(3).name = 'justin'; people(3).job = 'singer'; people(3).id = 246801; people(1).name people(2).name people(3).name people(:).name a = people(:).name a = [people(:).name] |
ball.mass = 10; ball.position = [0, 0, 100]; ball.velocity = [0, 0, 0] ball.position = ball.position + [0 10 0] ball.radius = 3 ball(2:3,1)=ball ball(1).mass = 1.0 ball(2).mass = 5.0 ball(3).mass = 10.0 ball.mass m = [ball.mass] totalMass = sum([ball.mass]) |
NameData.First = 'John'; NameData.MI = 'J'; NameData.Last = 'Doe'; |
StudentData.Name = NameData; |
StudentData.Status = 'Brilliant'; StudentData.HW = 10; StudentData.Exam = linspace(100,100,3); |
StudentData StudentData.Name StudentData.Exam |
StudentData.Exam(3) = 0; StudentData.Exam StudentData.Name.First = 'Jane'; StudentData.Name |
num_students = 5; for i=1:num_students ClassData(i) = StudentData; end ClassData ClassData(2) |
message = pass_or_fail(ClassData(2)); message |
function message = pass_or_fail(StudentData) Exam_avg = mean(StudentData.Exam); if Exam_avg >= 70 message = 'You pass!'; else message = 'You fail!'; end return; |
structName(index).nestedStructName(index).fieldName(indices) |
s(1).n(2).a = 2*ones(3); s(1).n(2).b = 2*eye(4); s(1).n(2).c = 2*magic(5); s(2).n(1).a = '1a'; s(2).n(2).a = '2a'; s(2).n(1).b = '1b'; s(2).n(2).b = '2b'; s(2).n(1).c = '1c'; s(2).n(2).c = '2c'; |
S = load('clown.mat') image(S.X) colormap(S.map) |
upperLeft = S.X(1:50,1:80); image(upperLeft); |
if isfield(s,'field3') s.field3 else 'no field3 found' end |
fieldnames(s) |
"I frankly felt like the reception we received on the way in from the airport was very warm and hospitable. And I want to thank the Canadian people who came out to wave -- with all five fingers -- for their hospitality." |
"It's a wise father who knows his child"
|
"Is the noise in my head bothering you?"
The monologue that runs in our brain is loud. It's heavy-metal loud compared to the quiet signals we get from the rest of the world.
All day, every day, that noise keeps going. It's the only voice that has seen everything we've seen, believes everything we believe. It's the noise that not only criticizes every action of every other person who disagrees with us, but it criticizes their motives as well. And, if we question it, it criticizes us as well.
Is it any wonder that projection is more powerful than empathy?
When we meet people, we either celebrate when they agree with us or plot to change or ignore them when they don't. There's not a lot of room for, "they might have a different experience of this moment than I do."
That noise in our head is selfish, afraid and angry. That noise is self-satisfied, self-important and certain. That noise pushes intimacy away and will do anything it can to degrade those that might challenge us.
But, against all odds, empathy is possible.
It's possible to amplify those too-quiet signals that others send us and to practice imagining, even for a moment, what it might be like to have their noise instead of our noise.
If we put in the effort and devote the time to practice this skill, we can get better at it. We merely have to begin.