Effacer les filtres
Effacer les filtres

How I define the variable B in a function [A, B] = ReadHyperc​ube(strcat​(pathname,​filename))​; ?

1 vue (au cours des 30 derniers jours)
Surya Gnyawali
Surya Gnyawali le 25 Avr 2018
Commenté : Rik le 26 Avr 2018
[filename, pathname, indx] = uigetfile( ...
{'*.hdr','Image Cube(*.bil)';
'*.*', 'All Files (*.*)'},'Pick a file','file path');
if indx == 1
[A, B] = ReadHypercube(strcat(pathname,filename));
elseif indx == 2
I will appreciate it. Thanks
  4 commentaires
Surya Gnyawali
Surya Gnyawali le 26 Avr 2018
Modifié(e) : Stephen23 le 26 Avr 2018
Hi Rik,
[A, B] = ReadHypercube(strcat(pathname,'.bil'));
This arises when I try to process cubical data set (hyperspectral).This function runs well but when I run another piece of code
%Copy wavelength data into array
hyperdata=zeros(size(B,1), 4);
hyperdata(:,1)=B;
hyperdata(:,2)=B;
This gives me an error
Undefined function or variable 'B'
That's why I am trying to define 'B' as out put
Rik
Rik le 26 Avr 2018
We have no idea what function you are trying to use/modify, so we can't help you. Based on the second block of code, I would guess that B is a columnar vector that contains the wavelengths of the hypercube, but we have no idea what your function does or how it would have to infer this vector.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Programming dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by