Hi Sahar.
Let's say you have a MATLAB table called "hourly_electricity" that contains the hourly generated electricity values where each row represents an hour and each column represents a day.
Firstly, to load a MATLAB table into Simulink, drag a "From Workspace" block from the Simulink Library browser into the Simulink model. Double-click on it to open its dialog box and set the "Data" field to "hourly_electricity". Now the MATLAB table is successfully loaded into the Simulink model.
Assuming that the values in the table are in kilwatts (kW), use the "Multiply" block to convert it into watts by connecting the output of the "From Workspace" block to it and setting its "Gain" field to "1000". This will multiply the kW values by 1000 to convert into watts.
Now, to calculate the voltage, a "Divide" block can be used.
The formula to calculate voltage is
voltage (V) = power (W) / current (A)
The output of the "Multiply" block is to be connected to the first input of this "Divide" block. The second input is the current value which can be 10A (if the battery can accept current upto 10A) for example. A constant block with value 10 can be used as the second input to this "Divide" block.
Now the output of the "Divide" block has the "Voltage" which can be used as an input to your battery model.