Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

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

1 Ansicht (letzte 30 Tage)
lakom Mariem
lakom Mariem am 31 Jul. 2017
Geschlossen: MATLAB Answer Bot am 20 Aug. 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

Antworten (1)

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

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by