Undefined function or variable 'netcdf'

5 Ansichten (letzte 30 Tage)
wassim boulala
wassim boulala am 7 Jun. 2020
Beantwortet: Neuropragmatist am 23 Jul. 2020
Hi !
i have a probleme , i want to run the (netcdf) function but i don't know how to download the package and include it in matlab .
could anyone help me please
clear;clc;close all;
% script crée une bathymétrie pour le modèle SWAN bathym fine ~70m (fichier
%origine) qu'on interpole à 1km pour l'expèrience avec swan resolution=
%dx=dy=1*1 km à partir des données gmrt-map-tool
f=netcdf('algiers_bay.grd','r');
lon=f{'lon'}(:);
lat=f{'lat'}(:);
d=f{'altitude'}(:);
fillval=f{'altitude'}.FillValue_(1);% fillvals c des NaN!

Antworten (1)

Neuropragmatist
Neuropragmatist am 23 Jul. 2020
I think your line is supposed to be:
f = netcdf.open('algiers_bay.grd','r');
Because netcdf on it's own doesn't do anything, it is a library of functions that are accessed by prefixing with 'netcdf'.
Hope this helps.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!