Réponse apportée
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 ...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
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 ...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 11 ans il y a | 0

Réponse apportée
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...

plus de 11 ans il y a | 1

Réponse apportée
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...

plus de 11 ans il y a | 0

| A accepté

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

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
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,...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
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 % ...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
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 ...

plus de 11 ans il y a | 1

Réponse apportée
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 ...

plus de 11 ans il y a | 0

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

plus de 11 ans il y a | 0

Réponse apportée
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...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
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); ...

plus de 11 ans il y a | 0

Réponse apportée
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...

plus de 11 ans il y a | 0

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

plus de 11 ans il y a | 0

Réponse apportée
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]; ...

plus de 11 ans il y a | 0

Réponse apportée
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...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
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); ...

plus de 11 ans il y a | 0

Réponse apportée
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...

plus de 11 ans il y a | 0

Réponse apportée
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 ...

plus de 11 ans il y a | 0

Réponse apportée
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...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
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';...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 11 ans il y a | 0

Réponse apportée
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...

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
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 ...

plus de 11 ans il y a | 2

Réponse apportée
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(....

plus de 11 ans il y a | 1

| A accepté

Réponse apportée
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 _...

plus de 11 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 11 ans il y a | 0

| A accepté

Charger plus