answersLogoWhite

0

What is a house 202?

User Avatar

Anonymous

12y ago
Updated: 8/20/2019

function icca_fun(csv_filename)

Cfig = findobj('tag','icca');

if(isempty(Cfig))

Cfig = figure;

end

if(nargin<1)

old_file = get(Cfig,'FileName');

[fnm,pth]=uigetfile('*.csv', old_file);

csv_file = fullfile(pth,fnm);

end

[c_pth,c_fnm,c_ext] = fileparts(csv_file);

data = uiimport(csv_file)

displacement = data.data(:,2)

force = data.data(:,3)

x_label = data.colheaders(2)

y_label = data.colheaders(3)

plot(displacement,force,'ro')

hold on

xlabel(x_label)

ylabel(y_label)

p_coeff = polyfit(displacement,force,2)

force_est = polyval(p_coeff,displacement)

plot(displacement,force_est,'b')

title(c_fnm)

hold off

str = sprintf('filename: %s P(1): %.2f P(2): %.2f P(3): %.2f\n', c_fnm, p_coeff(1), p_coeff(2), p_coeff(3));

User Avatar

Wiki User

12y ago

What else can I help you with?