Problem with my code?
8 views (last 30 days)
I wrote the following code that is based on reading two csv files that I include.
a = dlmread ('gb.csv')
b = dlmread ('gb2.csv')
function [Qfresh,Qsea] = concentration(CCLspring,Qspring)
%Qfresh = Qspring*(CCLsea-CCLspring)/(CCLsea-CCLfresh)
Qsea = Qspring*(CCLspring-CCLfresh)/(CCLsea-CCLfresh)
for i = 1:size(a,1)
for j = 1:size(a,2)
I get the following message that I don't understand: 'error: value on right hand side of assignment is undefined'.
Kevin Phung on 18 Oct 2019
looks like you included a space:
%a = dlmread ('gb.csv')
%b = dlmread ('gb2.csv')
a = dlmread('gb.csv')
b = dlmread('gb2.csv')
also it seems like dlmread is not recommended: https://www.mathworks.com/help/matlab/ref/dlmread.html