Use apostrophe for derivative?

I wrote a code about 7 months ago. It worked in

https://develop.open.wolframcloud.com/objects/wpc-welcome/ThingsToTry.nb

but now it does not. I created an array named pHFit, and then its derivative pHD using pHD=pHFit’

then I plot both arrays in the same plot. Before, I got both curves but now only the first one. Please help and thanks in advance.

Maybe you are using a character that looks similar to an apostrophe:

ToCharacterCode["'\[OpenCurlyQuote]\[CloseCurlyQuote]\[Prime]`"]

The apostrophes I used in the past and now should be the same because I copied and pasted the code used before into a Word file and now I just copy and paste it into https://develop.open.wolframcloud.com/objects/wpc-welcome/ThingsToTry.nb
again. Thanks for your reply nevertheless.

I would be very wary of copying and pasting from Word, which plays “smart” with quotes. You had better use an ascii text editor.
Can you check the incriminated apostrophes?

Can you check the incriminated apostrophes?

Sorry that I can’t follow you (on how to do the checking).

By the way, I tried another thing: the following is from the Documentation Center, as an example of derivative:

f[x_] := Sin[x] + x^2;f’[x]

it works even though I paste it into word first and then copy&paste it back to the Wolfram platform, so it seems that Word doesn’t plays “smart”. Maybe the problem is applying derivative on an array?

And I also tried typing the apostrophe character directly (the one on the left of the enter key, right?), but it still doesn’t work.

Please provide the entire code, and the notebook. Otherwise the community will be unable to help you. It can easily be a quote-like character; it is a common mistake…

My code is quite lengthy. Maybe I post another one (from other people) which I modified from to get mine.

a=Table[{i, i^2 - 3 i + 2 + 0.3 Random[]}, {i, -1, 3, 0.1}]; ListPlot[a];
b = Interpolation[a, Method → “Spline”];
c = b’;
Plot[Evaluate[{b[x], c[x]}], {x, -1, 3}]

Before, the plot consisted of two curves: a blue one for “b” and a red one for “c”. Now when the code is run, there is only the blue curve for “b”.

By the way, what do you mean by “notebook”? (Sorry that I am a beginner and not familiar with many terms.)

And if necessary, I can post my lengthy code. Thanks.

I cut and pasted the example provided and it works

$Version
(* 12.0.0 for Mac OS X x86 (64-bit) (April 7, 2019) *)

a = Table[{i, i^2 - 3 i + 2 + 0.3 Random[]}, {i, -1, 3, 0.1}]; 
ListPlot[a]; 
b = Interpolation[a, Method -> "Spline"];
c =  b'; 
Plot[Evaluate[{b[x], c[x]}], {x, -1, 3}]

Thanks for trying it out in your PC.

Very strange! It doesn’t work in my PC (see below).

I tried for Firefox and Chrome and it didn’t work in both browsers (both updated). My PC is Windows 10 Enterprise 64-bit. I also tried it on another PC with Windows 7Enterprise 32-bit. it didn’t work too. I also restarted the sessions.

By the way, I didn’t sign in Wolfram when I tried it. Does it matter?

I just found that if I put all codes into a single line, it works (see below). But if I had a line break anywhere, the derivative curve is missing (also see below).

Yes, Gianluca. I have made that mistake before.