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

fast 12 Jahre vor | 0

| akzeptiert

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

fast 12 Jahre vor | 0

| akzeptiert

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

fast 12 Jahre vor | 0

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

fast 12 Jahre vor | 1

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

fast 12 Jahre vor | 0

| akzeptiert

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

fast 12 Jahre vor | 0

| akzeptiert

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

fast 12 Jahre vor | 1

| akzeptiert

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

fast 12 Jahre vor | 1

| akzeptiert

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

fast 12 Jahre vor | 1

| akzeptiert

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

fast 12 Jahre vor | 1

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

fast 12 Jahre vor | 0

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

fast 12 Jahre vor | 0

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

fast 12 Jahre vor | 0

| akzeptiert

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

fast 12 Jahre vor | 0

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

fast 12 Jahre vor | 0

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

fast 12 Jahre vor | 0

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

fast 12 Jahre vor | 0

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

fast 12 Jahre vor | 1

| akzeptiert

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

fast 12 Jahre vor | 0

| akzeptiert

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

fast 12 Jahre vor | 0

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

fast 12 Jahre vor | 0

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

fast 12 Jahre vor | 0

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

fast 12 Jahre vor | 1

| akzeptiert

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

fast 12 Jahre vor | 0

| akzeptiert

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

fast 12 Jahre vor | 0

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

fast 12 Jahre vor | 1

| akzeptiert

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

fast 12 Jahre vor | 2

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

fast 12 Jahre vor | 1

| akzeptiert

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

fast 12 Jahre vor | 0

| akzeptiert

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

fast 12 Jahre vor | 0

| akzeptiert

Mehr laden