How to properly assigned to a variable vector of the cell?
Mostrar comentarios más antiguos
Dear all,
I have variable xx and cell (velky). I want to choose one vector velky {2,a} (for example velky{2,1})of this cell and assigned to a variable xx. I try to do this, but withnout succes.
This is my code:
load ('testovaci_modely_velke_skvrny')
load ('net')
prompt = {'Napište číslo testovacího modelu:','z'};
dlg_title = 'Vytvoření vlastního testovacího modelu';
num_lines = 1;
x = inputdlg('Napište číslo testovacího modelu:','Vytvoření vlastního testovacího modelu', [1 100]);
a = x{1,1};
disp('Zadali jste správné číslo.')
xx = velky{2,a};
% Y = sim(net,P);
imdl= mk_common_model('a2c0',16);
img_1 = mk_image(imdl);
img_input = img_1;
img_input.elem_data = xx;
figure
show_fem(img_input);
title('Testovací model')
Does anyone have any idea? Thank you for your answers.
Respuestas (2)
Image Analyst
el 12 de Mzo. de 2015
What does this show, after you get x and a:
whos x
x
whos a
a
4 comentarios
Veronika
el 13 de Mzo. de 2015
Image Analyst
el 13 de Mzo. de 2015
Just copy and paste what it says, don't paraphrase or interpret it - give us the actual output.
Veronika
el 13 de Mzo. de 2015
Image Analyst
el 13 de Mzo. de 2015
can you upload the mat file, and change the prompts to English and I'll try to run your exact code?
Veronika
el 13 de Mzo. de 2015
0 votos
2 comentarios
Image Analyst
el 13 de Mzo. de 2015
Error using load
Unable to read file 'testovaci_modely_velke_skvrny'.
No such file or directory.
Error in test1 (line 1)
load ('testovaci_modely_velke_skvrny')
Veronika
el 13 de Mzo. de 2015
Categorías
Más información sobre Read, Write, and Modify Image en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!