Cannot plot the fourier function "ERROR Data must be numeric, datetime, duration or an array convertible to double"
Afficher commentaires plus anciens
clear all
close all
%Sampling time
Ts=0.001;
t=0:Ts:2*pi;
%Timeaxis
TimeAxes_x = [0 10 0 0.5];
TimeAxes_y = [0 100 0 5000];
%Inverse fourier transform
syms w;
F2 = 1/(1+w^2);
f2 = ifourier(F2,t);
%F2w = 1/(1+t);
%Sampling frequency
fs=1/Ts;
w=(0:length(f2)-1)*fs/length(f2);
graph_subplot(1,211,w,abs(F2),TimeAxes_x,'t(s)','f2(w)','Frequency Doman of f2(t)');
Basically it just tells me that "ERROR Data must be numeric, datetime, duration or an array convertible to double" for that graph_subplot function. That function is basically a plot function. It mainly happens becasue of the w and abs(F2) in the functon. Can someone please help me with this?
1 commentaire
Cris LaPierre
le 25 Août 2021
You have not shared your function graph_subplot.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Calculus dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

