Python Forum

Full Version: Matlab to Python
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Dear Python Users,

I am new to python. I am using Jupyter notebook for simulations.

Could you please help me to read out the output table generated in the
simulation

I am able to do it in Matlab but I want to do it in Jupyter notebook. I am
attaching the matlab code and output table for reference.

clear;
A=xlsread('table.xlsx');

for row=2:size(A,1)
   s=1;
for i=6:202
    if A(row,i)*A(row,i+1)<0
        x1(row,s)=i;
        s=s+1;
    end
    if s>2
        dia(row)=x1(row,2)-x1(row,1);
        break;
    end
end
t(row)=A(row,1);
end
plot(t, dia)
And how to save these values in the same output table?

Best regards

Sateesh