Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Save inputs from a GUI into 3D matrix (always at the last position)
조회 수: 1 (최근 30일)
이전 댓글 표시
%prompt command for k number and length
prompt = {'k0:','Length:'};
dlg_title = 'Straight Duct specs';
num_lines = 1;
SDelements = {'0','0'};
Straightduct = inputdlg(prompt,dlg_title,num_lines,SDelements)
%insert values in function
sizeStorageMatrix=size(StorageMatrix); %get size of the storage matrix
dimT=sizeStorageMatrix(1,3); %take the number of matrices
if dimT==1
StorageMatrix(1:2,1:2,1)=straight_duct(str2num(SDelements{1}), str2num(answer{2}), Mach_Frange(1,1))
else
StorageMatrix(1:2,1:2,dimT+1)=straight_duct(str2num(SDelements{1}), str2num(answer{2}), Mach_Frange(1,1))
end
% code
end
This is my code for a GUI to create a 2by2 matrix which i'd like to save in a 3D matrix. This matrix should be saved in the first position of the 3D matrix and when i push the button more it should be saved in that corresponding position in the 3D matrix. I have, however, no idea to do this. Currently i declared my StorageMatrix at the beginning but i get an error when i run: variable storagematrix is not recognized. I've googled, i've run through the matlab help files but i can't seem to find my solution. Any hints?
kind regards,
Youri
댓글 수: 2
Walter Roberson
2013년 11월 26일
You do not show any initialization for StorageMatrix, so you would not be able to take size() of it.
답변 (0개)
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!