フィルターのクリア

how can i use slice for symbolic functions?

2 ビュー (過去 30 日間)
Moein
Moein 2014 年 10 月 1 日
コメント済み: Mischa Kim 2014 年 10 月 1 日
hi friends
as you know, for symbolic functions, we can not use formulas like plot, mesh, surf , ... and then we should use formulas like ezplot, ezmesh, ezsurf , ... but about the formula " slice " (for symbolic functions), what formula we sholud use? ezslice?!! (it doesn't exist)

採用された回答

Mischa Kim
Mischa Kim 2014 年 10 月 1 日
編集済み: Mischa Kim 2014 年 10 月 1 日
Moein, most likely you can use matlabFunction to convert the symbolic functions and then use function such as slice.
  2 件のコメント
Moein
Moein 2014 年 10 月 1 日
編集済み: Moein 2014 年 10 月 1 日
Hi Mischa
thanks a lot for your answer. i tried your answer but it errors i know my mistake: my code to draw slice, is incorrect let's solve it by an axample
for an example easier than my code, but like that, assume that i want to create slices for r(x,y,z) and r is symbolic function i use this code:
syms x y z;
r = x^2 + y^2 + z^2;
s = matlabFunction(r);
[x,y,z] = meshgrid(-2:.2:2,-2:.25:2,-2:.16:2);
xslice = [-1.2,.8,2]; yslice = 2; zslice = [-2,0];
slice(x,y,z,s,xslice,yslice,zslice)
colormap hsv
but it errors:
??? Error using ==> slice at 85 V must be a 3-D array.
what should i do? help me if you can
thanks a lot
Mischa Kim
Mischa Kim 2014 年 10 月 1 日
If your function is readily available (as is the case above) you do not need to use the symbolic approach at all. See the answer to your duplicate question.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by