Respondida
Reading only numeric data in a text file
it's almays more complicated to read a file with no defined data structure. In your case, you can use (and adjust for other ...

más de 11 años hace | 0

| aceptada

Respondida
Assign output a name?
Hi, for what I see, you need to do : Images = {'11a.bmp';'12b.bmp';'12c.bmp'}; % list of images RandomNumber = randi([1 ...

más de 11 años hace | 0

| aceptada

Respondida
How to hide the axes in front of 3D plots
Did you use the _waterfall_ function or _plot3_ (you mentionned _single graph_) in all cases, if you want to play with the sp...

más de 11 años hace | 0

Respondida
How can I make an Gaussian random array with a constraint?
Your criteria is too strict. it's allways risky to compare 2 doubles, because of the numerical precision. yo should do so...

más de 11 años hace | 1

Respondida
How to hide the axes in front of 3D plots
Hi, So to remove the annoying box : box off and for the spacing, it depends of the definition of your Z data. the mor...

más de 11 años hace | 0

| aceptada

Respondida
dimensions of a uipanel seem strange
Hi Jason, this is normal because your panel unit is in characters <</matlabcentral/answers/uploaded_files/20555/units....

más de 11 años hace | 0

| aceptada

Respondida
How I can change the simulink variable value from matlab gui?
Hi Simulink actually uses the variables defined in the _base_ workspace, not the local workspace of your function. here,...

más de 11 años hace | 1

| aceptada

Respondida
How can I pull a random image to display, from a folder of images using Psychtoolbox?
I don't know this toolbox (not sure a lot of people do). but in a general way, with matlab, you can do something like % ...

más de 11 años hace | 1

| aceptada

Respondida
How to save the value, a string, of a variable as a variable name of an array ?
Hi, something like s_fieldnames = 'aaa'; a_nums = [1, 2, 3, 4, 5, 6]; % create the variable aaa containing the...

más de 11 años hace | 1

| aceptada

Respondida
2 dice simulation. Code for when both dice = 6?
ok, so a = [6 2 6 2 6 1]; b = [6 4 5 6 6 3]; posInCommon = intersect(find(a==6),find(b==6)) posInCommon ...

más de 11 años hace | 1

Respondida
2 dice simulation. Code for when both dice = 6?
I'm not sure to get what you're trying to do. but _a_ and _b_ are vectors of size nx1. If you want to know if a and b are ...

más de 11 años hace | 0

Respondida
copy axes to clipboard
Matlab is clear, Undefined function or variable 'hAx'. when you do hcop = copyobj(hAx,newFig); you are us...

más de 11 años hace | 0

Respondida
copy axes to clipboard
if you're using GUIDE, don't forget to get and restore the handles structure with _guidata_ function Your_plot_Pushbutton(h...

más de 11 años hace | 0

| aceptada

Respondida
copy axes to clipboard
my bad, i went a little fast in my explanation. So, with an example x = 0:0.01:20; y1 = 200*exp(-0.05*x).*sin(x); ...

más de 11 años hace | 0

Respondida
copy axes to clipboard
In the prototype of _plotyy_ [AX,H1,H2] = plotyy(...) AX is a vector containing the handles of the 2 axes objects create...

más de 11 años hace | 0

Respondida
copy axes to clipboard
Hi, Actually, _plotyy_ creates 2 superimposed _axes_ objects (see the doc about the differents outputs arguments). So you ...

más de 11 años hace | 0

Respondida
how can I generate a zero one matrix using mulitiply?
Hi, Use logical indexing to get all zeros or non-zeros values of any vector or matrix. X = [0.1 1 0 0.3 0.004 0]; ...

más de 11 años hace | 0

Respondida
Help: Table cannot edit in a programmatic GUI?
Hi, You need to initialize the type the _Data_ parameter. by default, Matlab consider it is a double. But you want to put str...

más de 11 años hace | 1

| aceptada

Respondida
Edit entries in textfile with fopen
Hi, One way to to do this. Read the whole contents of your file in one cell. Modify the line you want (be careful to ke...

más de 11 años hace | 0

| aceptada

Respondida
How can I find the location of the minimum and maximum
Hi, just use the second output argument of the _min_ and _max_ functions. n=10; for i=1:5 Ai = rand(n,n); ...

más de 11 años hace | 0

Respondida
Plotting surf figure, with 2 matrix and one vector. Position/Force over time.
ok, so you want to use plot3 ? figure; Colors = {'b','r','g'}; for i=1:3 plot3(tid',MatDecendingPosition(:,i),M...

más de 11 años hace | 0

Respondida
Plotting surf figure, with 2 matrix and one vector. Position/Force over time.
when you use _surf_, you want to see a surface Z according two others datas X, Y. surf(X,Y,Z) means you will surf the matrix ...

más de 11 años hace | 0

Respondida
inserting contents of text file into a Listbox
Hi, I guess you need this : % Read the list in the text file "TextFile.txt" fid = fopen('TextFile.txt','r'); MyLis...

más de 11 años hace | 1

| aceptada

Respondida
If statement for a cell??
one way to do this is : % create the cell data Point_list={'Point',1,2,3,4;'Type','Fixed','Unfixed','Unfixed','Unfixed';...

más de 11 años hace | 0

| aceptada

Respondida
Cannot support cell arrays containing cell arrays or objects.
Hi, the aim of _cell2mat_ is to convert a cell that contains numbers into an array (matrix). your cell contains strings, s...

más de 11 años hace | 0

Respondida
how to delete header and footer from dat. file?
Hi, i guess you need more or less this kind of code : for i = 1:5000 FileToRewrite = ['DatFile_' num2str(i) '.dat...

más de 11 años hace | 1

| aceptada

Respondida
how to capture or copy all blocks of simulink file into MS word file.
Hi, To get capture of your model just print it. In the simulink editor File->Print, then select the options that fit your ...

más de 11 años hace | 2

Respondida
How can I get another window after clicking on the push button?
Hi, In your pushbutton callback, just close the current figure and open/call the new one. function PlayButton_callback(....

más de 11 años hace | 1

| aceptada

Respondida
How to Perform integration in MATLAB without using 'int ' Function
a classic way to integrate is to use <http://www.mathworks.fr/help/matlab/ref/quad.html quad>, or the variant (look at the doc _...

más de 11 años hace | 0

| aceptada

Respondida
Bhilding new matrix with selected index number
just use _b_ as an index vector : a = [9;1;3;2;5;6;8;1;2;5;8;2]; b = [4;6;1]; c=zeros(1,length(a)); c(b) = a(b...

más de 11 años hace | 0

| aceptada

Cargar más