답변 있음
Calculating distance between 3 points.
You can just use |vecnorm|, right? PD = vecnorm(P-D, 2, 2); PA = vecnorm(P-A, 2, 2);

거의 6년 전 | 0

| 수락됨

답변 있음
Construct quarter circle of data in matrix
I would do it like this: n = 5000; P = [randi(n, n, 1); zeros(n, 1)]; [X, Y] = meshgrid(1:n, flip(1:n)); r = roun...

거의 6년 전 | 0

| 수락됨

답변 있음
Pie chart resembling pacman?
I am assuming you want to rotate the chart to look like a Pacman? You could rotate the view angle like this: ax = gca; ...

거의 6년 전 | 1

| 수락됨

답변 있음
What to use to read a binary stl file?
Try the file exchange: <https://nl.mathworks.com/matlabcentral/fileexchange/22409-stl-file-reader>

거의 6년 전 | 0

답변 있음
How to wrap for loop around function commands and fplot?
I would choose to store the functions and labels in cells as follows: n = 3; range = 1:n; coeff = cell(n, 1); ano...

거의 6년 전 | 1

| 수락됨

답변 있음
Getting current position (x,y) of a 2D object created with a patch
p = patch('XData',x,'YData',y,'FaceColor','yellow','Parent',g); p.Vertices This should do it.

거의 6년 전 | 0

답변 있음
Replacing specific rows in a matrix.
a = xlsread('Book2.xls'); indexB = (a(:, 2) == 9|a(:, 2) ==12) & (a(:, 6) ==2|a(:, 6)==11|a(:, 6)==12); find(indexB) ...

거의 6년 전 | 0

| 수락됨

답변 있음
Finding same values in uneven arrays
Use the |ismember| function. A = [3 4 5 6 7 20 21 22 23 24 25 26]; B = [1 2 3 5 6 23 24 28 29 30 102 160 171 189 190]; ...

거의 6년 전 | 0

| 수락됨

답변 있음
How to plot for a loop
This should work just fine, although I would suggest using figure(1) instead of figure , which makes a new fig...

거의 6년 전 | 0

| 수락됨

답변 있음
I need help with a for loop that gives me an assignment error.
When you get this kind of error you want to look at the line (11 in this case) and check the sizes of the different variables. S...

거의 6년 전 | 0

| 수락됨

답변 있음
Errorbar: change line width of marker line, not of error bars
Unfortunately the errorbar data type does not have any children you can edit directly. I would probably do something like this a...

거의 6년 전 | 0

| 수락됨

답변 있음
How do i separate running data?
This is actually a really fun job for a new user. Please look into logical indexing <https://nl.mathworks.com/help/matlab/math/m...

거의 6년 전 | 1

| 수락됨

답변 있음
How to make my coding of canny edge detection into GUI?
Use the |uicontrol| function, see doc control For your example: global I global BW I = imread('ddd.jpg'); ...

거의 6년 전 | 0

답변 있음
Joint angle values are changing from an initial to a final value with constant velocity in a given time(Given as a loop function). I have to plot a graph of joint angle motion?
Please take a look at doc refreshdata This will allow you to specify a data source for your plot outside of the loop an...

거의 6년 전 | 0

답변 있음
Is there a simple approach to adding spaces before and after every number in a cell array, where each cell is a combination of numbers and letters?
I don't know why I took the time to do this and my function separating the words is super ugly but I think you want something li...

거의 6년 전 | 1

| 수락됨

답변 있음
I have a 1x50 cell array with a 780x6 table in each cell. I can access the cells but i would like to convert the different tables into matrices and give them a distinctive name but the loop gives me an error every time
You cannot store matrices inside matrices, you can however leave them inside the cell and convert them there using *table2array*...

거의 6년 전 | 0

답변 있음
How do I add a line, or a linear regression from cftool, to a scatter graph?
You could use *copyobj*: % data n = 200; x = 1:n; y = x+25*rand(1, n); figure(1) % handle to fir...

거의 6년 전 | 0

답변 있음
Need help with the pop-up menu and the Checkbox button
I edited <https://mathworks.com/help/matlab/ref/uicontrol.html this> example to include a checkbox, the edited code is attached....

거의 6년 전 | 1

| 수락됨

답변 있음
How to make Matlab Errors not appear (and therefore end a program)
I think you will want to simply take the input as text without evaluating, to do this use the 's' option in the input function: ...

거의 6년 전 | 0

답변 있음
Scatter3 with weights
You could pass color values as follows n = 1000; X = rand(n, 1); Y = rand(n, 1); Z = rand(n, 1); C = hypot(X, Y); siz...

거의 6년 전 | 0

| 수락됨

답변 있음
How to read data from a matrix according to the lower and upper index range
Define a grid to perform logical indexing on: n = 24; m = 5; gridx = repmat(1:n, m, 1); b=[2 4;5 7;8 9;1 10;12 1...

거의 6년 전 | 0

| 수락됨

답변 있음
HI friends.I have a question:what is the difference between imshow & imagesc in this code and why the time reduce??
This was answered here: <https://mathworks.com/matlabcentral/answers/72130-what-s-the-difference-between-imagesc-and-imshow> . ...

거의 6년 전 | 0

답변 있음
how to find a differentiation or derivative of each array(>1000*2) in cell consists 7000*1?
Should work just fine: u = cell(5, 1); u(:) = {rand(20, 2)}; du1 = diff(u{1}) gives me a 19x2 double.

거의 6년 전 | 0

답변 있음
Count lines in an Image
I adapted some code from the example OverlayRegionBoundariesOnImageExample.mlx to do what you probably want % Overlay Regio...

거의 6년 전 | 0

| 수락됨

답변 있음
Count lines in an Image
Is it just me or did you not attach any image?

거의 6년 전 | 0

답변 있음
How can I plot a triangle with its altitudes?
Please clarify what you are trying to do. What would you like to see as output?

거의 6년 전 | 0

답변 있음
Selecting different element of a matrix with each function operation
Hi JD, You could pass a counter variable i to your function as such: i = 1; while condition i = i+1; end f...

거의 6년 전 | 0

| 수락됨

질문


How do I load a module which could not be found?
When I open my SimScape Multibody model on the R2018a prerelease I get this warning: Warning: Can't load 'C:\Program Fi...

거의 6년 전 | 답변 수: 1 | 0

1

답변