Statistics
RANK
331
of 295,673
REPUTATION
248
CONTRIBUTIONS
3 Questions
118 Answers
ANSWER ACCEPTANCE
66.67%
VOTES RECEIVED
37
RANK
of 20,262
REPUTATION
N/A
AVERAGE RATING
0.00
CONTRIBUTIONS
0 Files
DOWNLOADS
0
ALL TIME DOWNLOADS
0
CONTRIBUTIONS
0 Posts
CONTRIBUTIONS
0 Public Channels
AVERAGE RATING
CONTRIBUTIONS
0 Highlights
AVERAGE NO. OF LIKES
Feeds
How to delete cell entries with an index vector
Hi! Are you sure that b is not longer than size(1) of A? Is b really a logical vector with true or false? I have no problem i...
11 years ago | 0
check if numbers exist in a structure field
Hi! You may write m = [files(1,1).day(:).median]; to get a vector of all values in 'day'. Then you can use ismember/...
11 years ago | 0
Convert Char to Cell
Hi! It seems you want to do: ListCell = num2cell(List); NewCol = size(List, 2) + 1; for n = 1:size(Table, ...
11 years ago | 0
| accepted
Create string of dots characters
Use repmat: repmat('.', 1, 10)
11 years ago | 1
| accepted
Can I use a for loop in the condition statement of an if branch??
Can you give an example? As far as I understand you have some values in your array that must match some condition. You may write...
11 years ago | 0
optimize inefficient piece of code
Hi! You can of course avoid the loop with p3(1:3, ind==1) = p1(:, ind==1); p3(1:3, ind==2) = p2(:, ind==2); This a...
11 years ago | 0
| accepted
Save data from a loop with a negative variable
Hi! Make a table like tt = -5:5; Access your variable with index -3 like V(tt==-3) PS: you should not dou...
11 years ago | 0
Plot the streamlines and pressure for flow around a rotating cylinder
Hi! Please use the code formatting for pasting code, thanks! And what is the question? What did you do? Where does the cod...
11 years ago | 0
Creating a polyval function
Hi! But you can use polyval with just p and x!
11 years ago | 2
| accepted
How to calculate the average without taking zeros values?
Hi! for n = 1:size(Y, 1) Average(n) = mean(Y(n, (Y(n, :) ~= 0))); end
11 years ago | 1
Selecting only some rows of a matrix
Hi! So, what is "i"? Did you mean ":"? I assume ":" here. Start by looking at the first criterion, you can write crit...
11 years ago | 0
Use regexp in Matlab to return the value of a variable from a text file
Hi! Maybe there is no need for a regexp. Read in the file, separate all lines at "=" and find the desired variable in the lef...
11 years ago | 0
How can i scan Column A in a matrix and if its true to have it average values in Column C
Hi! So you already imported your data into matlab? What kind of matrix do you have? Is it a cell array with strings in the fi...
11 years ago | 0
| accepted
How to plot a subset of triangles after DelaunayTri
Hi! If you have a triangulation you can of course plot specific triangles (if you know them) with TRI = dt.Triangula...
11 years ago | 1
| accepted
How can I transform a number to string with space using num2str?
Hi! Maybe this way? num = [1000; 1001]; % numeric part numpart = arrayfun(@(x) sprintf('%2d', mod(x,100)), num, 'U...
11 years ago | 0
| accepted
Activate radio button from another radio button
Hi! Usually the first argument is the handle to the object whose callback you are calling. You can get this from <http://www....
11 years ago | 0
| accepted
A game like "simon"
Hi! Some hints to get you started: * You can get the player's name using "input". * Make a loop from 1 to, let's say, 100...
11 years ago | 0
MATLAB Data from loop not saved
Hi! You can not use doubles as indices. Do instead: Res_E = logspace(0,2,100); for B = 1:length(Res_E); Tens =...
11 years ago | 0
| accepted
How to avoid setting of local directory as search path on startup?
Hi! Use the matlab startup script <http://www.mathworks.com/help/matlab/ref/matlabrc.html?searchHighlight=matlabrc matlabrc> ...
11 years ago | 0
Creating Dynamic Vector in Matlab GUI
Hi! Use a cell array for your file names (strings). Each time you upload a new image you add one cell to the array. After tha...
11 years ago | 0
How to find first nonzero element/first '1' per row and set other elements to zero without loops in 3D Matrix
Hi! Why don't you want loops? It is the easiest way. Try this: ix = 1:size(A, 1); % loop over al columns for col =...
11 years ago | 0
Change color of points
Hi! Look at the help of <http://www.mathworks.com/help/matlab/ref/plot.html plot>. You may give a LineSpec there.
11 years ago | 0
| accepted
Reformatting cell arrays of cell arrays
Hi! Try C{1, 1} = {'11'; '12'}; C{2, 1} = {'21'; '22'}; C{3, 1} = {'31'; '32'}; Rows = 3; Colu...
11 years ago | 0
| accepted
Problems when using textscan to read csv files
Hi! Even if the question is already answered, my suggestion is % read in file fid = fopen('myfile.csv'); FC = text...
11 years ago | 0
Slow debugging for long scripts
Hi! You can try to disable the code analyzing feature under "File -> Preferences -> Code Analyzer". Writing should not be del...
11 years ago | 0
To eliminate the lines begin with "%"
Hi! Read in your file: % read in a file fid = fopen(FileName); FC = textscan(fid, '%s', 'delimiter', '\n'); fcl...
11 years ago | 1
| accepted
how can I print out all the variables of my code?
Hi! Just look at your "Workspace", it can be found in the menu bar. Or type "who" in command window.
11 years ago | 1
| accepted