quiver(___,scale) invalid text character.
조회 수: 1 (최근 30일)
이전 댓글 표시
The "quiver" documentation page, "https://au.mathworks.com/help/matlab/ref/quiver.html" has in the Syntax section,
I copied this and pasted it into the R2021a command window, and got,
" quiver(___,scale)
" ↑
"Error: Invalid text character. Check for unsupported symbol, invisible
character, or pasting of non-ASCII characters."
If I had typed it, I might understand I might have typed it incorrectly, e.g., how many under-score characters is that? But when I copied from correct source (supposedly), and pasted, it should just work.
댓글 수: 0
답변 (1개)
Steven Lord
2021년 11월 5일
I'm not certain offhand where this is documented, but whenever you see ___ in the Syntax section of a function reference page it indicates that you can use any of the other syntaxes for that function in place of the ___ and then add on whatever additional input or output arguments are listed in that particular syntax. So based on the first four lines of the Syntax section:
quiver(X,Y,U,V)
quiver(U,V)
quiver(___,scale)
quiver(___,LineSpec)
you can call quiver as:
quiver(X, Y, U, V) % Just Syntax 1
quiver(U, V) % Just Syntax 2
quiver(X, Y, U, V, scale) % Filling in the blank in Syntax 3 with Syntax 1
quiver(U, V, scale) % Filling in the blank in Syntax 3 with Syntax 2
This avoids "combinatorial explosion" -- we don't have to say that both these syntaxes are allowed. For the case where you have just two syntax entries with ___ you don't save any space, but the Syntax section of quiver has six syntax entries with ___ -- listing all the combinations explicitly would be very long.
% Fill in Syntax 3's blank with Syntax 1, then put the result in Syntax 4's blank
quiver(X, Y, U, V, scale, LineSpec)
% Fill in Syntax 4's blank with Syntax 1, then put the result in Syntax 3's blank
quiver(X, Y, U, V, LineSpec, scale)
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!