Error Using fprintf Invalid file identifier. Use fopen to generate a valid file identifier.
Mostra commenti meno recenti
Hello,
I have this script.
I = (kron(ev1_of_alice,(ev1_of_bob+ev2_of_bob)))+kron(ev2_of_alice,(ev1_of_bob-ev2_of_bob));
if ~isnan(I)
fprintf("I = "+ I + "\n");
if abs(I)>2
fprintf("Violated Bell Inequality");
end
else
fprintf("Not enough data to determine S\n")
end
And when I run the script I have this error:
Error Using fprintf Invalid file identifier. Use fopen to generate a valid file identifier.
But I dont understand anything I is not a file I am trying to write a value not a file. How can I solve it?
Risposta accettata
Più risposte (1)
madhan ravi
il 21 Giu 2020
"I = "+ I + "\n" % without fprintf(...)
3 Commenti
the cyclist
il 21 Giu 2020
Modificato: the cyclist
il 21 Giu 2020
Because of the error OP is getting, I'm pretty sure that the variable I is a numeric array, so this method probably doesn't really display what is wanted.
madhan ravi
il 21 Giu 2020
I figured it out, was waiting for his response.
Gözde Üstün
il 25 Giu 2020
Categorie
Scopri di più su Frequency Transformations in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!