Why is part of the output “Null”?
Whenever I execute the code, portions of the output are null. How can I fix this? I am not sure the extent to which the result is invalid because I am not entirely familiar with the null output, though I have read the documentation. The point in which this problem arises is labeled in the following code:
omega[t_, t0_, T_] = Exp[(-(t - t0)^2)/T^2];
omegap[t_, t0p_, Tp_] = Exp[-((t - t0p)^2)/Tp^2];
eff[t_, t0p_,
Tp_] = ((omega[t, t0, T])^2 - (omegap[t, t0p,
Tp])^2)/(2 [CapitalDelta]);
eff[t_, t0p_,
Tp_] = (omegap[t, t0p, Tp]*omega[t, t0, T])/([CapitalDelta]);
ReducedHam = ({
{[CapitalDelta]eff[t, t0p, Tp], [CapitalOmega]eff[t, t0p, Tp]*
Exp[Sqrt[-1]*[CurlyPhi]]},
{[CapitalOmega]eff[t, t0p, Tp]*
Exp[-Sqrt[-1]*[CurlyPhi]], -[CapitalDelta]eff[t, t0p, Tp]}
});
Print[MatrixForm[ReducedHam]]
[Theta][t_, t0p_, Tp_] = ArcTan[omegap[t, t0p, Tp]/omega[t, t0, T]];
[Lambda]1 = ({
{Cos[[Theta]]},
{-Sin[[Theta]]*Exp[-Sqrt[-1]*[CurlyPhi]]}
});
[Lambda]2 = ({
{Sin[[Theta]]*Exp[Sqrt[-1]*[CurlyPhi]]},
{Cos[[Theta]]}
});
Print[MatrixForm[[Lambda]1]]
Print[MatrixForm[[Lambda]2]]
Mat1 = (D[[Lambda]1, [Theta]]).(Transpose[[Lambda]1]);
Print[Mat1]
V1 = Transpose[[Lambda]1].D[[Lambda]1, [Theta]];
V2 = [Lambda]1.Transpose[[Lambda]1];
Print[MatrixForm[V2]]
Mat2 = V1[[1, 1]] V2;
Print[Mat2]
Dimensions[Mat2];
Mat12 = Mat1 - Mat2;
Print[MatrixForm[Mat12]]
Mat3 = Print[
MatrixForm[D[[Lambda]2, [Theta]].Transpose[[Lambda]2]]];
V3 = Transpose[[Lambda]2].D[[Lambda]2, [Theta]];
V4 = [Lambda]2.Transpose[[Lambda]2];
Print[MatrixForm[V4]]
Mat4 = V3[[1, 1]] V4;
Print[MatrixForm[Mat4]]
Mat34 = Mat3 - Mat4;
CDTerm = Mat12 + Mat34 ;
Print[MatrixForm[Simplify[CDTerm]]]
(*this is where null arises*)
TotalHam = ReducedHam + CDTerm;
Print[MatrixForm[Simplify[TotalHam]]]
Dimensions[ReducedHam]
Dimensions[CDTerm]
[CapitalOmega]a[t_, t0p_,
Tp_] = (2 (((D[omega[t, t0, T], t])*(omegap[t, t0p, Tp])) - ((omega[
t, t0, T]) (D[omegap[t, t0, T], t]))))/((omegap[t, t0,
T])^2 + (omega[t, t0, T]^2))
[Gamma][t_, t0_, T_, [CurlyPhi]_] =
ArcTan[([CapitalOmega]a[t, t0p, Tp])/([CapitalOmega]eff[t, t0p,
Tp])] + [CurlyPhi];
f1[t_, t0_,
T_, [CurlyPhi]_] = (Exp[(Sqrt[-1]*[Gamma][t, t0,
T, [CurlyPhi]])]/2)
f2[t_, t0_, T_, [CurlyPhi]_] =
Exp[(Sqrt[-1]*[Gamma][t, t0, T, [CurlyPhi]])/2]
U = ({
{f1[t, t0, T, [CurlyPhi]], 0},
{0, f2[t, t0, T, [CurlyPhi]]}
})
Mat5 = ConjugateTranspose[U].TotalHam.U;
Print[MatrixForm[Mat5]]
Mat6 = ConjugateTranspose[U].(D[U, t]);
Print[MatrixForm[Mat6]]
HModified = Mat5 - Mat6;
Print[MatrixForm[Simplify[HModified]]]
matrix error output
New contributor
add a comment |
Whenever I execute the code, portions of the output are null. How can I fix this? I am not sure the extent to which the result is invalid because I am not entirely familiar with the null output, though I have read the documentation. The point in which this problem arises is labeled in the following code:
omega[t_, t0_, T_] = Exp[(-(t - t0)^2)/T^2];
omegap[t_, t0p_, Tp_] = Exp[-((t - t0p)^2)/Tp^2];
eff[t_, t0p_,
Tp_] = ((omega[t, t0, T])^2 - (omegap[t, t0p,
Tp])^2)/(2 [CapitalDelta]);
eff[t_, t0p_,
Tp_] = (omegap[t, t0p, Tp]*omega[t, t0, T])/([CapitalDelta]);
ReducedHam = ({
{[CapitalDelta]eff[t, t0p, Tp], [CapitalOmega]eff[t, t0p, Tp]*
Exp[Sqrt[-1]*[CurlyPhi]]},
{[CapitalOmega]eff[t, t0p, Tp]*
Exp[-Sqrt[-1]*[CurlyPhi]], -[CapitalDelta]eff[t, t0p, Tp]}
});
Print[MatrixForm[ReducedHam]]
[Theta][t_, t0p_, Tp_] = ArcTan[omegap[t, t0p, Tp]/omega[t, t0, T]];
[Lambda]1 = ({
{Cos[[Theta]]},
{-Sin[[Theta]]*Exp[-Sqrt[-1]*[CurlyPhi]]}
});
[Lambda]2 = ({
{Sin[[Theta]]*Exp[Sqrt[-1]*[CurlyPhi]]},
{Cos[[Theta]]}
});
Print[MatrixForm[[Lambda]1]]
Print[MatrixForm[[Lambda]2]]
Mat1 = (D[[Lambda]1, [Theta]]).(Transpose[[Lambda]1]);
Print[Mat1]
V1 = Transpose[[Lambda]1].D[[Lambda]1, [Theta]];
V2 = [Lambda]1.Transpose[[Lambda]1];
Print[MatrixForm[V2]]
Mat2 = V1[[1, 1]] V2;
Print[Mat2]
Dimensions[Mat2];
Mat12 = Mat1 - Mat2;
Print[MatrixForm[Mat12]]
Mat3 = Print[
MatrixForm[D[[Lambda]2, [Theta]].Transpose[[Lambda]2]]];
V3 = Transpose[[Lambda]2].D[[Lambda]2, [Theta]];
V4 = [Lambda]2.Transpose[[Lambda]2];
Print[MatrixForm[V4]]
Mat4 = V3[[1, 1]] V4;
Print[MatrixForm[Mat4]]
Mat34 = Mat3 - Mat4;
CDTerm = Mat12 + Mat34 ;
Print[MatrixForm[Simplify[CDTerm]]]
(*this is where null arises*)
TotalHam = ReducedHam + CDTerm;
Print[MatrixForm[Simplify[TotalHam]]]
Dimensions[ReducedHam]
Dimensions[CDTerm]
[CapitalOmega]a[t_, t0p_,
Tp_] = (2 (((D[omega[t, t0, T], t])*(omegap[t, t0p, Tp])) - ((omega[
t, t0, T]) (D[omegap[t, t0, T], t]))))/((omegap[t, t0,
T])^2 + (omega[t, t0, T]^2))
[Gamma][t_, t0_, T_, [CurlyPhi]_] =
ArcTan[([CapitalOmega]a[t, t0p, Tp])/([CapitalOmega]eff[t, t0p,
Tp])] + [CurlyPhi];
f1[t_, t0_,
T_, [CurlyPhi]_] = (Exp[(Sqrt[-1]*[Gamma][t, t0,
T, [CurlyPhi]])]/2)
f2[t_, t0_, T_, [CurlyPhi]_] =
Exp[(Sqrt[-1]*[Gamma][t, t0, T, [CurlyPhi]])/2]
U = ({
{f1[t, t0, T, [CurlyPhi]], 0},
{0, f2[t, t0, T, [CurlyPhi]]}
})
Mat5 = ConjugateTranspose[U].TotalHam.U;
Print[MatrixForm[Mat5]]
Mat6 = ConjugateTranspose[U].(D[U, t]);
Print[MatrixForm[Mat6]]
HModified = Mat5 - Mat6;
Print[MatrixForm[Simplify[HModified]]]
matrix error output
New contributor
Mat3
isNull
, sincePrint[…]
always returnsNull
. You might be interested inEcho
, which always returns its argument. For the next time, try to look at the different values of the expression that containsNull
- this way, you can easily trace the error back to its origin (theMat3=Print[…]
line in this case). For this,Echo
is your friend, as you can just put it in front of anything you want to look at
– Lukas Lang
Dec 28 '18 at 15:33
add a comment |
Whenever I execute the code, portions of the output are null. How can I fix this? I am not sure the extent to which the result is invalid because I am not entirely familiar with the null output, though I have read the documentation. The point in which this problem arises is labeled in the following code:
omega[t_, t0_, T_] = Exp[(-(t - t0)^2)/T^2];
omegap[t_, t0p_, Tp_] = Exp[-((t - t0p)^2)/Tp^2];
eff[t_, t0p_,
Tp_] = ((omega[t, t0, T])^2 - (omegap[t, t0p,
Tp])^2)/(2 [CapitalDelta]);
eff[t_, t0p_,
Tp_] = (omegap[t, t0p, Tp]*omega[t, t0, T])/([CapitalDelta]);
ReducedHam = ({
{[CapitalDelta]eff[t, t0p, Tp], [CapitalOmega]eff[t, t0p, Tp]*
Exp[Sqrt[-1]*[CurlyPhi]]},
{[CapitalOmega]eff[t, t0p, Tp]*
Exp[-Sqrt[-1]*[CurlyPhi]], -[CapitalDelta]eff[t, t0p, Tp]}
});
Print[MatrixForm[ReducedHam]]
[Theta][t_, t0p_, Tp_] = ArcTan[omegap[t, t0p, Tp]/omega[t, t0, T]];
[Lambda]1 = ({
{Cos[[Theta]]},
{-Sin[[Theta]]*Exp[-Sqrt[-1]*[CurlyPhi]]}
});
[Lambda]2 = ({
{Sin[[Theta]]*Exp[Sqrt[-1]*[CurlyPhi]]},
{Cos[[Theta]]}
});
Print[MatrixForm[[Lambda]1]]
Print[MatrixForm[[Lambda]2]]
Mat1 = (D[[Lambda]1, [Theta]]).(Transpose[[Lambda]1]);
Print[Mat1]
V1 = Transpose[[Lambda]1].D[[Lambda]1, [Theta]];
V2 = [Lambda]1.Transpose[[Lambda]1];
Print[MatrixForm[V2]]
Mat2 = V1[[1, 1]] V2;
Print[Mat2]
Dimensions[Mat2];
Mat12 = Mat1 - Mat2;
Print[MatrixForm[Mat12]]
Mat3 = Print[
MatrixForm[D[[Lambda]2, [Theta]].Transpose[[Lambda]2]]];
V3 = Transpose[[Lambda]2].D[[Lambda]2, [Theta]];
V4 = [Lambda]2.Transpose[[Lambda]2];
Print[MatrixForm[V4]]
Mat4 = V3[[1, 1]] V4;
Print[MatrixForm[Mat4]]
Mat34 = Mat3 - Mat4;
CDTerm = Mat12 + Mat34 ;
Print[MatrixForm[Simplify[CDTerm]]]
(*this is where null arises*)
TotalHam = ReducedHam + CDTerm;
Print[MatrixForm[Simplify[TotalHam]]]
Dimensions[ReducedHam]
Dimensions[CDTerm]
[CapitalOmega]a[t_, t0p_,
Tp_] = (2 (((D[omega[t, t0, T], t])*(omegap[t, t0p, Tp])) - ((omega[
t, t0, T]) (D[omegap[t, t0, T], t]))))/((omegap[t, t0,
T])^2 + (omega[t, t0, T]^2))
[Gamma][t_, t0_, T_, [CurlyPhi]_] =
ArcTan[([CapitalOmega]a[t, t0p, Tp])/([CapitalOmega]eff[t, t0p,
Tp])] + [CurlyPhi];
f1[t_, t0_,
T_, [CurlyPhi]_] = (Exp[(Sqrt[-1]*[Gamma][t, t0,
T, [CurlyPhi]])]/2)
f2[t_, t0_, T_, [CurlyPhi]_] =
Exp[(Sqrt[-1]*[Gamma][t, t0, T, [CurlyPhi]])/2]
U = ({
{f1[t, t0, T, [CurlyPhi]], 0},
{0, f2[t, t0, T, [CurlyPhi]]}
})
Mat5 = ConjugateTranspose[U].TotalHam.U;
Print[MatrixForm[Mat5]]
Mat6 = ConjugateTranspose[U].(D[U, t]);
Print[MatrixForm[Mat6]]
HModified = Mat5 - Mat6;
Print[MatrixForm[Simplify[HModified]]]
matrix error output
New contributor
Whenever I execute the code, portions of the output are null. How can I fix this? I am not sure the extent to which the result is invalid because I am not entirely familiar with the null output, though I have read the documentation. The point in which this problem arises is labeled in the following code:
omega[t_, t0_, T_] = Exp[(-(t - t0)^2)/T^2];
omegap[t_, t0p_, Tp_] = Exp[-((t - t0p)^2)/Tp^2];
eff[t_, t0p_,
Tp_] = ((omega[t, t0, T])^2 - (omegap[t, t0p,
Tp])^2)/(2 [CapitalDelta]);
eff[t_, t0p_,
Tp_] = (omegap[t, t0p, Tp]*omega[t, t0, T])/([CapitalDelta]);
ReducedHam = ({
{[CapitalDelta]eff[t, t0p, Tp], [CapitalOmega]eff[t, t0p, Tp]*
Exp[Sqrt[-1]*[CurlyPhi]]},
{[CapitalOmega]eff[t, t0p, Tp]*
Exp[-Sqrt[-1]*[CurlyPhi]], -[CapitalDelta]eff[t, t0p, Tp]}
});
Print[MatrixForm[ReducedHam]]
[Theta][t_, t0p_, Tp_] = ArcTan[omegap[t, t0p, Tp]/omega[t, t0, T]];
[Lambda]1 = ({
{Cos[[Theta]]},
{-Sin[[Theta]]*Exp[-Sqrt[-1]*[CurlyPhi]]}
});
[Lambda]2 = ({
{Sin[[Theta]]*Exp[Sqrt[-1]*[CurlyPhi]]},
{Cos[[Theta]]}
});
Print[MatrixForm[[Lambda]1]]
Print[MatrixForm[[Lambda]2]]
Mat1 = (D[[Lambda]1, [Theta]]).(Transpose[[Lambda]1]);
Print[Mat1]
V1 = Transpose[[Lambda]1].D[[Lambda]1, [Theta]];
V2 = [Lambda]1.Transpose[[Lambda]1];
Print[MatrixForm[V2]]
Mat2 = V1[[1, 1]] V2;
Print[Mat2]
Dimensions[Mat2];
Mat12 = Mat1 - Mat2;
Print[MatrixForm[Mat12]]
Mat3 = Print[
MatrixForm[D[[Lambda]2, [Theta]].Transpose[[Lambda]2]]];
V3 = Transpose[[Lambda]2].D[[Lambda]2, [Theta]];
V4 = [Lambda]2.Transpose[[Lambda]2];
Print[MatrixForm[V4]]
Mat4 = V3[[1, 1]] V4;
Print[MatrixForm[Mat4]]
Mat34 = Mat3 - Mat4;
CDTerm = Mat12 + Mat34 ;
Print[MatrixForm[Simplify[CDTerm]]]
(*this is where null arises*)
TotalHam = ReducedHam + CDTerm;
Print[MatrixForm[Simplify[TotalHam]]]
Dimensions[ReducedHam]
Dimensions[CDTerm]
[CapitalOmega]a[t_, t0p_,
Tp_] = (2 (((D[omega[t, t0, T], t])*(omegap[t, t0p, Tp])) - ((omega[
t, t0, T]) (D[omegap[t, t0, T], t]))))/((omegap[t, t0,
T])^2 + (omega[t, t0, T]^2))
[Gamma][t_, t0_, T_, [CurlyPhi]_] =
ArcTan[([CapitalOmega]a[t, t0p, Tp])/([CapitalOmega]eff[t, t0p,
Tp])] + [CurlyPhi];
f1[t_, t0_,
T_, [CurlyPhi]_] = (Exp[(Sqrt[-1]*[Gamma][t, t0,
T, [CurlyPhi]])]/2)
f2[t_, t0_, T_, [CurlyPhi]_] =
Exp[(Sqrt[-1]*[Gamma][t, t0, T, [CurlyPhi]])/2]
U = ({
{f1[t, t0, T, [CurlyPhi]], 0},
{0, f2[t, t0, T, [CurlyPhi]]}
})
Mat5 = ConjugateTranspose[U].TotalHam.U;
Print[MatrixForm[Mat5]]
Mat6 = ConjugateTranspose[U].(D[U, t]);
Print[MatrixForm[Mat6]]
HModified = Mat5 - Mat6;
Print[MatrixForm[Simplify[HModified]]]
matrix error output
matrix error output
New contributor
New contributor
New contributor
asked Dec 28 '18 at 15:15
khaylablack
111
111
New contributor
New contributor
Mat3
isNull
, sincePrint[…]
always returnsNull
. You might be interested inEcho
, which always returns its argument. For the next time, try to look at the different values of the expression that containsNull
- this way, you can easily trace the error back to its origin (theMat3=Print[…]
line in this case). For this,Echo
is your friend, as you can just put it in front of anything you want to look at
– Lukas Lang
Dec 28 '18 at 15:33
add a comment |
Mat3
isNull
, sincePrint[…]
always returnsNull
. You might be interested inEcho
, which always returns its argument. For the next time, try to look at the different values of the expression that containsNull
- this way, you can easily trace the error back to its origin (theMat3=Print[…]
line in this case). For this,Echo
is your friend, as you can just put it in front of anything you want to look at
– Lukas Lang
Dec 28 '18 at 15:33
Mat3
is Null
, since Print[…]
always returns Null
. You might be interested in Echo
, which always returns its argument. For the next time, try to look at the different values of the expression that contains Null
- this way, you can easily trace the error back to its origin (the Mat3=Print[…]
line in this case). For this, Echo
is your friend, as you can just put it in front of anything you want to look at– Lukas Lang
Dec 28 '18 at 15:33
Mat3
is Null
, since Print[…]
always returns Null
. You might be interested in Echo
, which always returns its argument. For the next time, try to look at the different values of the expression that contains Null
- this way, you can easily trace the error back to its origin (the Mat3=Print[…]
line in this case). For this, Echo
is your friend, as you can just put it in front of anything you want to look at– Lukas Lang
Dec 28 '18 at 15:33
add a comment |
1 Answer
1
active
oldest
votes
Just leave out the Print
functions, and remember not to throw away the results with ;
. Example:
m1 = IdentityMatrix[3];
MatrixForm[m1]
m2 = 3 m1;
MatrixForm[m2]
Most experienced Mathematica users rarely use Print
. To show results, just evaluate them.
A more compact, functional form is:
MatrixForm[m1 = IdentityMatrix[3]]
MatrixForm[m2 = 3 m1]
Same output as above.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "387"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
khaylablack is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f188500%2fwhy-is-part-of-the-output-null%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Just leave out the Print
functions, and remember not to throw away the results with ;
. Example:
m1 = IdentityMatrix[3];
MatrixForm[m1]
m2 = 3 m1;
MatrixForm[m2]
Most experienced Mathematica users rarely use Print
. To show results, just evaluate them.
A more compact, functional form is:
MatrixForm[m1 = IdentityMatrix[3]]
MatrixForm[m2 = 3 m1]
Same output as above.
add a comment |
Just leave out the Print
functions, and remember not to throw away the results with ;
. Example:
m1 = IdentityMatrix[3];
MatrixForm[m1]
m2 = 3 m1;
MatrixForm[m2]
Most experienced Mathematica users rarely use Print
. To show results, just evaluate them.
A more compact, functional form is:
MatrixForm[m1 = IdentityMatrix[3]]
MatrixForm[m2 = 3 m1]
Same output as above.
add a comment |
Just leave out the Print
functions, and remember not to throw away the results with ;
. Example:
m1 = IdentityMatrix[3];
MatrixForm[m1]
m2 = 3 m1;
MatrixForm[m2]
Most experienced Mathematica users rarely use Print
. To show results, just evaluate them.
A more compact, functional form is:
MatrixForm[m1 = IdentityMatrix[3]]
MatrixForm[m2 = 3 m1]
Same output as above.
Just leave out the Print
functions, and remember not to throw away the results with ;
. Example:
m1 = IdentityMatrix[3];
MatrixForm[m1]
m2 = 3 m1;
MatrixForm[m2]
Most experienced Mathematica users rarely use Print
. To show results, just evaluate them.
A more compact, functional form is:
MatrixForm[m1 = IdentityMatrix[3]]
MatrixForm[m2 = 3 m1]
Same output as above.
edited Dec 28 '18 at 16:45
answered Dec 28 '18 at 16:20
John Doty
6,6341924
6,6341924
add a comment |
add a comment |
khaylablack is a new contributor. Be nice, and check out our Code of Conduct.
khaylablack is a new contributor. Be nice, and check out our Code of Conduct.
khaylablack is a new contributor. Be nice, and check out our Code of Conduct.
khaylablack is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Mathematica Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f188500%2fwhy-is-part-of-the-output-null%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Mat3
isNull
, sincePrint[…]
always returnsNull
. You might be interested inEcho
, which always returns its argument. For the next time, try to look at the different values of the expression that containsNull
- this way, you can easily trace the error back to its origin (theMat3=Print[…]
line in this case). For this,Echo
is your friend, as you can just put it in front of anything you want to look at– Lukas Lang
Dec 28 '18 at 15:33