Community Profile

Contact

Top 1% contributor

Use repmat: repmat('.', 1, 10)

accepted

1

Answered 1 year ago

Hi! But you can use polyval with just p and x!

Hi! If you have a triangulation you can of course plot specific triangles (if you know them) with TRI = dt.Triangula...

Hi! Read in your file: % read in a file fid = fopen(FileName); FC = textscan(fid, '%s', 'delimiter', '\n'); fcl...

Hi! Just look at your "Workspace", it can be found in the menu bar. Or type "who" in command window.

Hi! Loop over your a/b vectors and increase the specified matrix element: M = zeros(max(a), max(b)); for n = 1:le...

Hi! You may use "unique". The second output is the index of all unique values, e.g. in column 3. All other indices are duplic...

Hi! I have a problem with accessing arrays that are properties of a class. I attached a sample class. In this class just one ...

3 Answers

2

Asked 1 year ago

Hi! If you plot like plot(x,y) and y is a matrix, you get plots with different color automatically. But you can do so...

This is basic Matlab that you can learn using the Documentation Center: <http://www.mathworks.com/help/matlab/function-basics.ht...

Answered 2 years ago

Hi! Use one of the commands "pause" or "input".

Hi! It seems you want to do: ListCell = num2cell(List); NewCol = size(List, 2) + 1; for n = 1:size(Table, ...

0

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

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

Hi! Maybe this way? num = [1000; 1001]; % numeric part numpart = arrayfun(@(x) sprintf('%2d', mod(x,100)), num, 'U...

Hi! Usually the first argument is the handle to the object whose callback you are calling. You can get this from <http://www....

Hi! You can not use doubles as indices. Do instead: Res_E = logspace(0,2,100); for B = 1:length(Res_E); Tens =...

Hi! Look at the help of <http://www.mathworks.com/help/matlab/ref/plot.html plot>. You may give a LineSpec there.

Hi! Try C{1, 1} = {'11'; '12'}; C{2, 1} = {'21'; '22'}; C{3, 1} = {'31'; '32'}; Rows = 3; Colu...

Hi! It seems all your 6 fields in a row are separated with ",", right? The easiest is to read in the whole file and process e...

Hi! I would suggest another approach. It is (in my opinion) easier to debug, because you can track your steps easily. % ...

Hi! Each function has its own workspace. If you write a function you will have a separate workspace to work in, without the v...

Hi! Use arrays to save the results: % allocate arrays for results Energyin = zeros(JN-1, 1); Energyout= zeros(JN-1...

Hi! The help uses sfix(8) instead of ufix(8) and another scaling: <http://www.mathworks.com/help/simulink/slref/fixpt_interp1...

Hi! I'm not sure if I understood correctly. You can concat N matrices into a 3d matrix with dimensions (2x2xN). Basically, yo...

Hi! X = [2 4 -3 5 6]; Y = [4 9 1 -2 1]; L1 = [1 1 1 1 1]; L2 = [2 1 2 1 2]; L3 = [3 3 3 3 1]; L4 = [10 0...

Hi! It seems you already found your solution on file exchange. Why don't you use it? Your input function will be m=0;...

Hi! % get indices of unique values [~, ~, c] = unique(A(:, 1)); % loop over all unique values for n = 1:max...

Hi! orderedratings = cellfun(@(x) ratings{3,x}, ... cellfun(@(x) strcmp(x,ratings(2,:)), ratings(1,:), 'UniformOut...

Hi! Is it a binary file or a normal text file? For text files you may use "fopen" and "fgetl" to read line by line. If you kn...

Load more