quiver(___,scale) invalid text character.

1 回表示 (過去 30 日間)
Michael Hodgson
Michael Hodgson 2021 年 11 月 5 日
回答済み: Steven Lord 2021 年 11 月 5 日
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.

回答 (1 件)

Steven Lord
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)

カテゴリ

Help Center および File ExchangeVector Fields についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by