code for a known answer
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
i have a code that plots a figure. Now say that i don't know what the value of 'a' is. I am trying to write a basic numerical code to find the value of 'a' from the figure/ info (not using really complexed matlab functions). I have a complexed matlab function that i am using to find 'a' also, (thanks Azzi). I plan to compare the basic numerical code with that found with the matlab function. Any help would be appreciated.
%Plots fourier transform.
a=5;
w=-a:a/100:a;
F=2*sin(a*w)./w;
plot(w,F)
%finds value of -a- using complexed matlab functions
x=get(gca,'xlim');
a1=x(end);
disp(a1);
0 comentarios
Respuesta aceptada
Azzi Abdelmalek
el 15 de Ag. de 2013
x=get(gca,'xlim')
a=x(end)
2 comentarios
Azzi Abdelmalek
el 15 de Ag. de 2013
Editada: Azzi Abdelmalek
el 15 de Ag. de 2013
doc gca
doc gcf
doc gco
Más respuestas (0)
Ver también
Categorías
Más información sobre Creating, Deleting, and Querying Graphics Objects en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!