Linspace() related query : excluding
Title
Question
<span style="font-size:14.0pt;font-family:"Calibri","sans-serif"; mso-ascii-theme-font:minor-latin;mso-fareast-font-family:Calibri;mso-fareast-theme-font: minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;mso-ansi-language:EN-US;mso-fareast-language: EN-US;mso-bidi-language:AR-SA">returns 100 evenly spaced samples from -pi to pi excluding -pi but including pi?</span>
<span style="font-size:14.0pt;font-family:"Calibri","sans-serif"; mso-ascii-theme-font:minor-latin;mso-fareast-font-family:Calibri;mso-fareast-theme-font: minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;mso-ansi-language:EN-US;mso-fareast-language: EN-US;mso-bidi-language:AR-SA">can u pls exaplin how to exclude starting point???</span>
<span style="font-size:14.0pt;font-family:"Calibri","sans-serif"; mso-ascii-theme-font:minor-latin;mso-fareast-font-family:Calibri;mso-fareast-theme-font: minor-latin;mso-hansi-theme-font:minor-latin;mso-bidi-font-family:"Times New Roman"; mso-bidi-theme-font:minor-bidi;mso-ansi-language:EN-US;mso-fareast-language: EN-US;mso-bidi-language:AR-SA">
</span>
</span>
Python Using-the-plot-command-interactively 09-10 min 10-20 sec
Answers:
You can use the expression:
series = linspace(-pi, pi, 100)
to get an array of 100 equally spaced points including -pi and pi.
Linspace command gives you the option to exclude the last point (pi in this example). However there is no way to exclude the first point.
The third asks you what the expression linspace(-pi, pi, 100) does. This is an MCQ type question with the options given below.
Login to add comment