Subtracting within only 1 dimension of a multidimensional array
3 ビュー (過去 30 日間)
古いコメントを表示
Question: I have a gridded array. Example:
airMetGrid <90x180x40542> single
but my air temp is in kelvin, so I need to subtract 273.15 from ONLY the 3rd dimension (and not mess up my grid). How do I do this? It seems simple but I can't wrap my brain around it today.
Thanks
0 件のコメント
採用された回答
Matt J
2013 年 7 月 8 日
編集済み: Matt J
2013 年 7 月 8 日
Since 273.15 is a scalar, there is no apparent difference between subtracting it from the 3rd dimension and subtracting it from the entire array.
inCelsius = airMetGrid-273.15;
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Whos についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!