Risposto
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 ...

oltre 11 anni fa | 0

| accettato

Risposto
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 ...

oltre 11 anni fa | 0

| accettato

Risposto
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...

oltre 11 anni fa | 0

Risposto
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...

oltre 11 anni fa | 1

Risposto
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...

oltre 11 anni fa | 0

| accettato

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

oltre 11 anni fa | 0

| accettato

Risposto
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,...

oltre 11 anni fa | 1

| accettato

Risposto
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 % ...

oltre 11 anni fa | 1

| accettato

Risposto
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...

oltre 11 anni fa | 1

| accettato

Risposto
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 ...

oltre 11 anni fa | 1

Risposto
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 ...

oltre 11 anni fa | 0

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

oltre 11 anni fa | 0

Risposto
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...

oltre 11 anni fa | 0

| accettato

Risposto
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); ...

oltre 11 anni fa | 0

Risposto
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...

oltre 11 anni fa | 0

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

oltre 11 anni fa | 0

Risposto
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]; ...

oltre 11 anni fa | 0

Risposto
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...

oltre 11 anni fa | 1

| accettato

Risposto
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...

oltre 11 anni fa | 0

| accettato

Risposto
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); ...

oltre 11 anni fa | 0

Risposto
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...

oltre 11 anni fa | 0

Risposto
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 ...

oltre 11 anni fa | 0

Risposto
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...

oltre 11 anni fa | 1

| accettato

Risposto
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';...

oltre 11 anni fa | 0

| accettato

Risposto
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...

oltre 11 anni fa | 0

Risposto
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...

oltre 11 anni fa | 1

| accettato

Risposto
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 ...

oltre 11 anni fa | 2

Risposto
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(....

oltre 11 anni fa | 1

| accettato

Risposto
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 _...

oltre 11 anni fa | 0

| accettato

Risposto
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...

oltre 11 anni fa | 0

| accettato

Carica altro