Force slope and return intercept value (assuming a non-zero intercept)

조회 수: 4 (최근 30일)
Hi, I would like to force a slope value and know the intercept for that particular slope value....
Const = polyfit(log10(x),log10(y), 1);
m = Const(1);
k = Const(2);
b_fit = (10^k) * (x.^m);
This is the one that I use to return both... I want to force m and return k

채택된 답변

Bruno Luong
Bruno Luong 2018년 12월 2일
m = WhatYouWantItToBe
k = mean(log10(y)-m*log10(x))

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by