- #1
- 2,168
- 193
I have some data and I need power fit.And display it on the graph.But I couldn't find the right codes for it.(I need codes)
Here my graph,
Here my codes,
>> x=BN(:,2);
>> B=BN(:,1);
>> plot(x,B,'go')
>> plot(x,B,'go')
>> hold on
>> xlabel('Distance (m)','Fontsize',21);
>> ylabel('Magnetic Field Strength (T)','Fontsize',21)
>> title('B vs x,Part (A)','Fontsize',23)
>> grid on
>>
I tried ,
>> f = fit(x,B,'power1')
but says,
Undefined function 'fit' for input arguments of type 'double'.
Thanks
Here my graph,
Here my codes,
>> x=BN(:,2);
>> B=BN(:,1);
>> plot(x,B,'go')
>> plot(x,B,'go')
>> hold on
>> xlabel('Distance (m)','Fontsize',21);
>> ylabel('Magnetic Field Strength (T)','Fontsize',21)
>> title('B vs x,Part (A)','Fontsize',23)
>> grid on
>>
I tried ,
>> f = fit(x,B,'power1')
but says,
Undefined function 'fit' for input arguments of type 'double'.
Thanks