I want to read 2 nc files which containing soil moisture as variable, but when readin the given code ,it showing some error
    1 次查看(过去 30 天)
  
       显示 更早的评论
    
file1= 'path of the file1' 
file2='path of file2' 
sm= ncread(file1,'sm') ;
sm=ncread (file2,'sm') ;
8 个评论
  Walter Roberson
      
      
 2023-5-28
				As far as I can tell, ncread is part of basic MATLAB in R2022a, so you should not be told that it is unrecognized.
Exception: if you just happened to have named a variable ncread somewhere inside the function, then even if the variable had been clear or had not been initialized yet, MATLAB would decide that ncread is not a function reference inside the function. 
If you are not using ncread as a variable somewhere inside the function, then try
rehash toolboxcache
Also please show us the result for
which -all ncread
回答(1 个)
  KSSV
      
      
 2023-5-26
        file1= 'path of the file1' ; % path with ame of file 
file2='path of file2' ; % path with name of file 
sm1= ncread(file1,'sm') ;
sm2=ncread (file2,'sm') ;
0 个评论
另请参阅
类别
				在 Help Center 和 File Exchange 中查找有关 Entering Commands 的更多信息
			
	产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


