Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

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

1 vue (au cours des 30 derniers jours)
lakom Mariem
lakom Mariem le 31 Juil 2017
Clôturé : MATLAB Answer Bot le 20 Août 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

Réponses (1)

Walter Roberson
Walter Roberson le 31 Juil 2017
fplot(f, [0,50])
Not 0:50

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by