Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

why do i got the axis x from 0 to 1 despite i wrote fplot (f,[0:50])

1 visualización (últimos 30 días)
lakom Mariem
lakom Mariem el 31 de Jul. de 2017
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
Please i need your help I want to run this code in commond window (Matlab) : 1/ssj(4,30) 2/f= @(x) ssj(4,x) 3/fplot(f,[0:50]) the problem is that,when plotting I got a figure where the axis x from 0 to 1 not from 0 to 50 like i wrote in the third line of code Can anyone help me please..and thanks in advance
knowing that the the file "ssj" is below :
function y= ssj(K,p)
p= 10^(p/10); rs = 0.1; %rs = p/100; ro = 2^(2*rs); f=0; for i=1:K s=(nchoosek(K,i)*((-1)^i))*((K-1-i*ro+i*ro*log(i*ro/(K-1)))/((K-1-i*ro)^2)); f=f+s; end f= f*(K-1)+1 y = f;
end

Respuestas (1)

Walter Roberson
Walter Roberson el 31 de Jul. de 2017
fplot(f, [0,50])
Not 0:50

La pregunta está cerrada.

Community Treasure Hunt

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

Start Hunting!

Translated by