回答済み
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 ...

11年以上 前 | 0

| 採用済み

回答済み
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 ...

11年以上 前 | 0

| 採用済み

回答済み
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...

11年以上 前 | 0

回答済み
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...

11年以上 前 | 1

回答済み
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...

11年以上 前 | 0

| 採用済み

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

11年以上 前 | 0

| 採用済み

回答済み
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,...

11年以上 前 | 1

| 採用済み

回答済み
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 % ...

11年以上 前 | 1

| 採用済み

回答済み
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...

11年以上 前 | 1

| 採用済み

回答済み
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 ...

11年以上 前 | 1

回答済み
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 ...

11年以上 前 | 0

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

11年以上 前 | 0

回答済み
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...

11年以上 前 | 0

| 採用済み

回答済み
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); ...

11年以上 前 | 0

回答済み
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...

11年以上 前 | 0

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

11年以上 前 | 0

回答済み
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]; ...

11年以上 前 | 0

回答済み
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...

11年以上 前 | 1

| 採用済み

回答済み
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...

11年以上 前 | 0

| 採用済み

回答済み
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); ...

11年以上 前 | 0

回答済み
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...

11年以上 前 | 0

回答済み
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 ...

11年以上 前 | 0

回答済み
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...

11年以上 前 | 1

| 採用済み

回答済み
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';...

11年以上 前 | 0

| 採用済み

回答済み
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...

11年以上 前 | 0

回答済み
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...

11年以上 前 | 1

| 採用済み

回答済み
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 ...

11年以上 前 | 2

回答済み
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(....

11年以上 前 | 1

| 採用済み

回答済み
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 _...

11年以上 前 | 0

| 採用済み

回答済み
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...

11年以上 前 | 0

| 採用済み

さらに読み込む