Info

This question is closed. Reopen it to edit or answer.

Xls row and saving problems

1 view (last 30 days)
venkat ta
venkat ta on 10 Jul 2020
Closed: MATLAB Answer Bot on 20 Aug 2021
I have data in the matrix and I want to save as below style to import in the analyser
I tried the code but it did not work
can you guide me for the first 4 rows to fill the same details and after datas
clc
clear
close all
load('displacement.mat')
freq(:,1)=exported_curves(1,:)';
Displacement(:,1)=exported_curves(2,:)';
% set log scale
f_interp=logspace(log10(20),log10(19999),200);
Displacement_interp = interp1(freq,Displacement,f_interp);
figure(1)
semilogx(freq,Displacement,'r','LineWidth',1.8);
hold on
semilogx(f_interp,Displacement_interp,'b--','LineWidth',1.8);
xlabel('Frequency [Hz]','FontSize',20)
ylabel('Xmax [mm]','FontSize',20)
set(gca,'FontSize',20);
set(gca,'xscale','log')
grid on
grid minor
g = title(Tyre Xmax Levels');set(g,'FontSize',20);g.Color = 'blue';
xlim([10 1000]); ylim([0 6]);
h = legend('LSD','LSD Inter','Max','location','northeast');
set(h,'FontSize',10);
x0=10;
y0=10;
width=1200;
height=300;
set(gcf,'position',[x0,y0,width,height])
output_target_Displacement=[f_interp' Displacement_interp'];
% dlmwrite(['Disp_target.csv'],output_target_Displacement,';');
filenamewrite1=['RMS Level -> Offset'];
sheet = 1;
xlRange = 'A5';
xlswrite(filenamewrite1,output_target_Displacement,sheet,xlRange)

Answers (0)

Tags

Products


Release

R2018a

Community Treasure Hunt

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

Start Hunting!