Can you please help me to get the square root of the sum of squares of the second column in the text file ?
    4 ビュー (過去 30 日間)
  
       古いコメントを表示
    
Hello everyone, Thank you for reading this query. I need some help to read the text file attached and replace the NaN with the 0 and also find the square root of the sum of squares for the second column and store the result to a certain variable. Can you help me with the code?
4 件のコメント
採用された回答
  Matt J
      
      
 2022 年 9 月 28 日
        
      編集済み: Matt J
      
      
 2022 年 9 月 28 日
  
      Your attachment didn't make it, but assuming it's called yourFile.txt,
[~,col]=readvars('yourFile.txt');
result = norm(col(~isnan(col)));
その他の回答 (0 件)
参考
カテゴリ
				Help Center および File Exchange で Data Type Conversion についてさらに検索
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




