フィルターのクリア

Plot a fourier transform of a 1x1 sym. WARNING: The following error was reported evaluating the function in FunctionLine update: Unable to convert expression into double array.

3 ビュー (過去 30 日間)
I have a function "J" which depends by the variable "theta".
In particular I have obtained a 1x1 sym value. I can plot this function (the interval is from 0 to 0.6) with fplot that is:
fplot(J, [0 0.6])
It is all ok since I obtain the correct graph.
Now I want to evaluate its Fourier transform. Since J is a 1x1 sym, I used the code "fourier" and not "fft", that is:
Y=fourier(J);
I obtain again a 1X1 sym.
Now I want to plot Y in order to obtain its spectrum, so:
fplot(abs(Y));
Note that I am not considering the normalization, but at the moment it is not the problem since I need only a way to plot a 1x1 sym value.
This is the message:
Warning: Function behaves unexpectedly on array inputs. To improve performance, properly vectorize your function to return an output with the
same size and shape as the input arguments.
> In matlab.graphics.function.FunctionLine>getFunction
In matlab.graphics.function.FunctionLine/updateFunction
In matlab.graphics.function.FunctionLine/set.Function_I
In matlab.graphics.function.FunctionLine/set.Function
In matlab.graphics.function.FunctionLine
In fplot>singleFplot (line 232)
In fplot>@(f)singleFplot(cax,{f},limits,extraOpts,args) (line 191)
In fplot>vectorizeFplot (line 191)
In fplot (line 161)
In grafico_delle_densita_di_correnti_theta_unilatero (line 139)
Warning: Error updating FunctionLine.
The following error was reported evaluating the function in FunctionLine update: Unable to convert expression into double array.

回答 (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