陰関数の描画時におい​て、(x,y)座標を​変数にとりこみたい。

2 visualizaciones (últimos 30 días)
高木 範明
高木 範明 el 8 de Nov. de 2023
Comentada: 高木 範明 el 9 de Nov. de 2023
AppDesignerにおいて、fimplicitでグラフを作成した時、その(x,y)の値をCSVファイルで取り込みたいのですが、うまく行きません。
ImplicitFunctionLineプロパティには、XDataやYDataがあるようですが、次のように記載しても、データがとれません。
また、エラーも発生しません。どこが間違っているのかご教示いただければ幸いです。
  fimplicit(app.UIAxes,@(x,y) x.^2 + y.^2 -3, 'MeshDensity', 151, 'XData',app.XX, 'YData', app.YY);
  2 comentarios
Dyuman Joshi
Dyuman Joshi el 8 de Nov. de 2023
But fimplicit does not require any data to plot.
And the XData and YData properties are Read-only. They can't be modified.
What is it that you want to plot? What is the idea/objective here?
高木 範明
高木 範明 el 8 de Nov. de 2023
Thank you for your quick response to my question.
I would like to get the coordinates of (x,y) on the fimplicit,
and use (x,y) for numerical analysis.

Iniciar sesión para comentar.

Respuesta aceptada

Akira Agata
Akira Agata el 9 de Nov. de 2023
ImplicitFunctionLine の XData, YData プロパティは陰関数を描画した際に生成されます。
以下のようにすると、生成後の XData, YData を取得することができます。
% 陰関数を描画
figure
h = fimplicit(@(x,y) x.^2 + y.^2 -3);
% XData, YDataプロパティを取得
x = h.XData;
y = h.YData;
% 表示
disp([x', y'])
-0.0037 -1.7320 -0.0231 -1.7319 -0.0462 -1.7314 -0.0693 -1.7307 -0.0924 -1.7296 -0.1155 -1.7282 -0.1386 -1.7265 -0.1617 -1.7245 -0.1847 -1.7221 -0.2078 -1.7195 -0.2309 -1.7166 -0.2540 -1.7133 -0.2771 -1.7097 -0.2819 -1.7089 -0.3002 -1.7058 -0.3233 -1.7016 -0.3464 -1.6970 -0.3695 -1.6921 -0.3926 -1.6870 -0.3973 -1.6858 -0.4157 -1.6814 -0.4388 -1.6755 -0.4619 -1.6693 -0.4850 -1.6628 -0.4851 -1.6627 -0.5081 -1.6558 -0.5312 -1.6486 -0.5542 -1.6410 -0.5581 -1.6397 -0.5773 -1.6330 -0.6004 -1.6246 -0.6219 -1.6166 -0.6235 -1.6159 -0.6466 -1.6068 -0.6697 -1.5973 -0.6788 -1.5935 -0.6928 -1.5874 -0.7159 -1.5771 -0.7306 -1.5704 -0.7390 -1.5665 -0.7621 -1.5553 -0.7783 -1.5473 -0.7852 -1.5438 -0.8083 -1.5319 -0.8226 -1.5242 -0.8314 -1.5195 -0.8545 -1.5066 -0.8641 -1.5011 -0.8776 -1.4932 -0.9007 -1.4795 -0.9030 -1.4780 -0.9237 -1.4651 -0.9398 -1.4549 -0.9468 -1.4503 -0.9699 -1.4350 -0.9746 -1.4318 -0.9930 -1.4191 -1.0077 -1.4087 -1.0161 -1.4026 -1.0392 -1.3857 -1.0393 -1.3856 -1.0623 -1.3680 -1.0693 -1.3625 -1.0854 -1.3497 -1.0981 -1.3394 -1.1085 -1.3308 -1.1257 -1.3163 -1.1316 -1.3113 -1.1522 -1.2932 -1.1547 -1.2910 -1.1776 -1.2702 -1.1778 -1.2700 -1.2009 -1.2482 -1.2020 -1.2471 -1.2240 -1.2255 -1.2255 -1.2240 -1.2471 -1.2020 -1.2482 -1.2009 -1.2700 -1.1778 -1.2702 -1.1776 -1.2910 -1.1547 -1.2932 -1.1522 -1.3113 -1.1316 -1.3163 -1.1257 -1.3308 -1.1085 -1.3394 -1.0981 -1.3497 -1.0854 -1.3625 -1.0693 -1.3680 -1.0623 -1.3856 -1.0393 -1.3857 -1.0392 -1.4026 -1.0161 -1.4087 -1.0077 -1.4191 -0.9930 -1.4318 -0.9746 -1.4350 -0.9699 -1.4503 -0.9468 -1.4549 -0.9398 -1.4651 -0.9237 -1.4780 -0.9030 -1.4795 -0.9007 -1.4932 -0.8776 -1.5011 -0.8641 -1.5066 -0.8545 -1.5195 -0.8314 -1.5242 -0.8226 -1.5319 -0.8083 -1.5438 -0.7852 -1.5473 -0.7783 -1.5553 -0.7621 -1.5665 -0.7390 -1.5704 -0.7306 -1.5771 -0.7159 -1.5874 -0.6928 -1.5935 -0.6788 -1.5973 -0.6697 -1.6068 -0.6466 -1.6159 -0.6235 -1.6166 -0.6219 -1.6246 -0.6004 -1.6330 -0.5773 -1.6397 -0.5581 -1.6410 -0.5542 -1.6486 -0.5312 -1.6558 -0.5081 -1.6627 -0.4851 -1.6628 -0.4850 -1.6693 -0.4619 -1.6755 -0.4388 -1.6814 -0.4157 -1.6858 -0.3973 -1.6870 -0.3926 -1.6921 -0.3695 -1.6970 -0.3464 -1.7016 -0.3233 -1.7058 -0.3002 -1.7089 -0.2819 -1.7097 -0.2771 -1.7133 -0.2540 -1.7166 -0.2309 -1.7195 -0.2078 -1.7221 -0.1847 -1.7245 -0.1617 -1.7265 -0.1386 -1.7282 -0.1155 -1.7296 -0.0924 -1.7307 -0.0693 -1.7314 -0.0462 -1.7319 -0.0231 -1.7320 -0.0037 NaN NaN 1.7320 -0.0037 1.7319 -0.0231 1.7314 -0.0462 1.7307 -0.0693 1.7296 -0.0924 1.7282 -0.1155 1.7265 -0.1386 1.7245 -0.1617 1.7221 -0.1847 1.7195 -0.2078 1.7166 -0.2309 1.7133 -0.2540 1.7097 -0.2771 1.7089 -0.2819 1.7058 -0.3002 1.7016 -0.3233 1.6970 -0.3464 1.6921 -0.3695 1.6870 -0.3926 1.6858 -0.3973 1.6814 -0.4157 1.6755 -0.4388 1.6693 -0.4619 1.6628 -0.4850 1.6627 -0.4851 1.6558 -0.5081 1.6486 -0.5312 1.6410 -0.5542 1.6397 -0.5581 1.6330 -0.5773 1.6246 -0.6004 1.6166 -0.6219 1.6159 -0.6235 1.6068 -0.6466 1.5973 -0.6697 1.5935 -0.6788 1.5874 -0.6928 1.5771 -0.7159 1.5704 -0.7306 1.5665 -0.7390 1.5553 -0.7621 1.5473 -0.7783 1.5438 -0.7852 1.5319 -0.8083 1.5242 -0.8226 1.5195 -0.8314 1.5066 -0.8545 1.5011 -0.8641 1.4932 -0.8776 1.4795 -0.9007 1.4780 -0.9030 1.4651 -0.9237 1.4549 -0.9398 1.4503 -0.9468 1.4350 -0.9699 1.4318 -0.9746 1.4191 -0.9930 1.4087 -1.0077 1.4026 -1.0161 1.3857 -1.0392 1.3856 -1.0393 1.3680 -1.0623 1.3625 -1.0693 1.3497 -1.0854 1.3394 -1.0981 1.3308 -1.1085 1.3163 -1.1257 1.3113 -1.1316 1.2932 -1.1522 1.2910 -1.1547 1.2702 -1.1776 1.2700 -1.1778 1.2482 -1.2009 1.2471 -1.2020 1.2255 -1.2240 1.2240 -1.2255 1.2020 -1.2471 1.2009 -1.2482 1.1778 -1.2700 1.1776 -1.2702 1.1547 -1.2910 1.1522 -1.2932 1.1316 -1.3113 1.1257 -1.3163 1.1085 -1.3308 1.0981 -1.3394 1.0854 -1.3497 1.0693 -1.3625 1.0623 -1.3680 1.0393 -1.3856 1.0392 -1.3857 1.0161 -1.4026 1.0077 -1.4087 0.9930 -1.4191 0.9746 -1.4318 0.9699 -1.4350 0.9468 -1.4503 0.9398 -1.4549 0.9237 -1.4651 0.9030 -1.4780 0.9007 -1.4795 0.8776 -1.4932 0.8641 -1.5011 0.8545 -1.5066 0.8314 -1.5195 0.8226 -1.5242 0.8083 -1.5319 0.7852 -1.5438 0.7783 -1.5473 0.7621 -1.5553 0.7390 -1.5665 0.7306 -1.5704 0.7159 -1.5771 0.6928 -1.5874 0.6788 -1.5935 0.6697 -1.5973 0.6466 -1.6068 0.6235 -1.6159 0.6219 -1.6166 0.6004 -1.6246 0.5773 -1.6330 0.5581 -1.6397 0.5542 -1.6410 0.5312 -1.6486 0.5081 -1.6558 0.4851 -1.6627 0.4850 -1.6628 0.4619 -1.6693 0.4388 -1.6755 0.4157 -1.6814 0.3973 -1.6858 0.3926 -1.6870 0.3695 -1.6921 0.3464 -1.6970 0.3233 -1.7016 0.3002 -1.7058 0.2819 -1.7089 0.2771 -1.7097 0.2540 -1.7133 0.2309 -1.7166 0.2078 -1.7195 0.1847 -1.7221 0.1617 -1.7245 0.1386 -1.7265 0.1155 -1.7282 0.0924 -1.7296 0.0693 -1.7307 0.0462 -1.7314 0.0231 -1.7319 0.0037 -1.7320 NaN NaN -1.7320 0.0037 -1.7319 0.0231 -1.7314 0.0462 -1.7307 0.0693 -1.7296 0.0924 -1.7282 0.1155 -1.7265 0.1386 -1.7245 0.1617 -1.7221 0.1847 -1.7195 0.2078 -1.7166 0.2309 -1.7133 0.2540 -1.7097 0.2771 -1.7089 0.2819 -1.7058 0.3002 -1.7016 0.3233 -1.6970 0.3464 -1.6921 0.3695 -1.6870 0.3926 -1.6858 0.3973 -1.6814 0.4157 -1.6755 0.4388 -1.6693 0.4619 -1.6628 0.4850 -1.6627 0.4851 -1.6558 0.5081 -1.6486 0.5312 -1.6410 0.5542 -1.6397 0.5581 -1.6330 0.5773 -1.6246 0.6004 -1.6166 0.6219 -1.6159 0.6235 -1.6068 0.6466 -1.5973 0.6697 -1.5935 0.6788 -1.5874 0.6928 -1.5771 0.7159 -1.5704 0.7306 -1.5665 0.7390 -1.5553 0.7621 -1.5473 0.7783 -1.5438 0.7852 -1.5319 0.8083 -1.5242 0.8226 -1.5195 0.8314 -1.5066 0.8545 -1.5011 0.8641 -1.4932 0.8776 -1.4795 0.9007 -1.4780 0.9030 -1.4651 0.9237 -1.4549 0.9398 -1.4503 0.9468 -1.4350 0.9699 -1.4318 0.9746 -1.4191 0.9930 -1.4087 1.0077 -1.4026 1.0161 -1.3857 1.0392 -1.3856 1.0393 -1.3680 1.0623 -1.3625 1.0693 -1.3497 1.0854 -1.3394 1.0981 -1.3308 1.1085 -1.3163 1.1257 -1.3113 1.1316 -1.2932 1.1522 -1.2910 1.1547 -1.2702 1.1776 -1.2700 1.1778 -1.2482 1.2009 -1.2471 1.2020 -1.2255 1.2240 -1.2240 1.2255 -1.2020 1.2471 -1.2009 1.2482 -1.1778 1.2700 -1.1776 1.2702 -1.1547 1.2910 -1.1522 1.2932 -1.1316 1.3113 -1.1257 1.3163 -1.1085 1.3308 -1.0981 1.3394 -1.0854 1.3497 -1.0693 1.3625 -1.0623 1.3680 -1.0393 1.3856 -1.0392 1.3857 -1.0161 1.4026 -1.0077 1.4087 -0.9930 1.4191 -0.9746 1.4318 -0.9699 1.4350 -0.9468 1.4503 -0.9398 1.4549 -0.9237 1.4651 -0.9030 1.4780 -0.9007 1.4795 -0.8776 1.4932 -0.8641 1.5011 -0.8545 1.5066 -0.8314 1.5195 -0.8226 1.5242 -0.8083 1.5319 -0.7852 1.5438 -0.7783 1.5473 -0.7621 1.5553 -0.7390 1.5665 -0.7306 1.5704 -0.7159 1.5771 -0.6928 1.5874 -0.6788 1.5935 -0.6697 1.5973 -0.6466 1.6068 -0.6235 1.6159 -0.6219 1.6166 -0.6004 1.6246 -0.5773 1.6330 -0.5581 1.6397 -0.5542 1.6410 -0.5312 1.6486 -0.5081 1.6558 -0.4851 1.6627 -0.4850 1.6628 -0.4619 1.6693 -0.4388 1.6755 -0.4157 1.6814 -0.3973 1.6858 -0.3926 1.6870 -0.3695 1.6921 -0.3464 1.6970 -0.3233 1.7016 -0.3002 1.7058 -0.2819 1.7089 -0.2771 1.7097 -0.2540 1.7133 -0.2309 1.7166 -0.2078 1.7195 -0.1847 1.7221 -0.1617 1.7245 -0.1386 1.7265 -0.1155 1.7282 -0.0924 1.7296 -0.0693 1.7307 -0.0462 1.7314 -0.0231 1.7319 -0.0037 1.7320 NaN NaN 0.0037 1.7320 0.0231 1.7319 0.0462 1.7314 0.0693 1.7307 0.0924 1.7296 0.1155 1.7282 0.1386 1.7265 0.1617 1.7245 0.1847 1.7221 0.2078 1.7195 0.2309 1.7166 0.2540 1.7133 0.2771 1.7097 0.2819 1.7089 0.3002 1.7058 0.3233 1.7016 0.3464 1.6970 0.3695 1.6921 0.3926 1.6870 0.3973 1.6858 0.4157 1.6814 0.4388 1.6755 0.4619 1.6693 0.4850 1.6628 0.4851 1.6627 0.5081 1.6558 0.5312 1.6486 0.5542 1.6410 0.5581 1.6397 0.5773 1.6330 0.6004 1.6246 0.6219 1.6166 0.6235 1.6159 0.6466 1.6068 0.6697 1.5973 0.6788 1.5935 0.6928 1.5874 0.7159 1.5771 0.7306 1.5704 0.7390 1.5665 0.7621 1.5553 0.7783 1.5473 0.7852 1.5438 0.8083 1.5319 0.8226 1.5242 0.8314 1.5195 0.8545 1.5066 0.8641 1.5011 0.8776 1.4932 0.9007 1.4795 0.9030 1.4780 0.9237 1.4651 0.9398 1.4549 0.9468 1.4503 0.9699 1.4350 0.9746 1.4318 0.9930 1.4191 1.0077 1.4087 1.0161 1.4026 1.0392 1.3857 1.0393 1.3856 1.0623 1.3680 1.0693 1.3625 1.0854 1.3497 1.0981 1.3394 1.1085 1.3308 1.1257 1.3163 1.1316 1.3113 1.1522 1.2932 1.1547 1.2910 1.1776 1.2702 1.1778 1.2700 1.2009 1.2482 1.2020 1.2471 1.2240 1.2255 1.2255 1.2240 1.2471 1.2020 1.2482 1.2009 1.2700 1.1778 1.2702 1.1776 1.2910 1.1547 1.2932 1.1522 1.3113 1.1316 1.3163 1.1257 1.3308 1.1085 1.3394 1.0981 1.3497 1.0854 1.3625 1.0693 1.3680 1.0623 1.3856 1.0393 1.3857 1.0392 1.4026 1.0161 1.4087 1.0077 1.4191 0.9930 1.4318 0.9746 1.4350 0.9699 1.4503 0.9468 1.4549 0.9398 1.4651 0.9237 1.4780 0.9030 1.4795 0.9007 1.4932 0.8776 1.5011 0.8641 1.5066 0.8545 1.5195 0.8314 1.5242 0.8226 1.5319 0.8083 1.5438 0.7852 1.5473 0.7783 1.5553 0.7621 1.5665 0.7390 1.5704 0.7306 1.5771 0.7159 1.5874 0.6928 1.5935 0.6788 1.5973 0.6697 1.6068 0.6466 1.6159 0.6235 1.6166 0.6219 1.6246 0.6004 1.6330 0.5773 1.6397 0.5581 1.6410 0.5542 1.6486 0.5312 1.6558 0.5081 1.6627 0.4851 1.6628 0.4850 1.6693 0.4619 1.6755 0.4388 1.6814 0.4157 1.6858 0.3973 1.6870 0.3926 1.6921 0.3695 1.6970 0.3464 1.7016 0.3233 1.7058 0.3002 1.7089 0.2819 1.7097 0.2771 1.7133 0.2540 1.7166 0.2309 1.7195 0.2078 1.7221 0.1847 1.7245 0.1617 1.7265 0.1386 1.7282 0.1155 1.7296 0.0924 1.7307 0.0693 1.7314 0.0462 1.7319 0.0231 1.7320 0.0037
  1 comentario
高木 範明
高木 範明 el 9 de Nov. de 2023
私の希望していましたデータが得られました。
どうもありがとうございました。

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre MATLAB en Help Center y File Exchange.

Productos


Versión

R2023a

Community Treasure Hunt

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

Start Hunting!