![photo](/responsive_image/150/150/0/0/0/cache/matlabcentral/profiles/20240325_1604580602633_DEF.jpg)
Johan
Followers: 0 Following: 0
Feeds
답변 있음
How to reduce the computation time of for loop?
You can likely vectorize your code: i_loop = 3264:64:86610 ; M = size(i_loop,1); N = 25; Freq_vec = rand(N,1); Turntable_an...
How to reduce the computation time of for loop?
You can likely vectorize your code: i_loop = 3264:64:86610 ; M = size(i_loop,1); N = 25; Freq_vec = rand(N,1); Turntable_an...
대략 2년 전 | 0
| 수락됨
답변 있음
Deleting rows of a matrix based on values from another matrix
You can use ismember() to do that: A = randi(5,5,3) B = randi(5,2,1) % Find all the row where col 1 to 2 of A have a value in...
Deleting rows of a matrix based on values from another matrix
You can use ismember() to do that: A = randi(5,5,3) B = randi(5,2,1) % Find all the row where col 1 to 2 of A have a value in...
대략 2년 전 | 0
| 수락됨
답변 있음
while solving a couple ordinary differential equation, I'm getting an error of Unable to perform assignment because the left and right sides have a different number of element
func2 and func4 uses A1 and A2 respectively which means they are using the whole arrays, either call A1 and A2 in the func defin...
while solving a couple ordinary differential equation, I'm getting an error of Unable to perform assignment because the left and right sides have a different number of element
func2 and func4 uses A1 and A2 respectively which means they are using the whole arrays, either call A1 and A2 in the func defin...
대략 2년 전 | 0
| 수락됨
답변 있음
Is it possible to explode/expand a map? i.e. separate the countries by a given distance (such as exploding a pie chart)
You could scale the regions around there geometric centers. There are builtin matlab tool using the polyshape structure that can...
Is it possible to explode/expand a map? i.e. separate the countries by a given distance (such as exploding a pie chart)
You could scale the regions around there geometric centers. There are builtin matlab tool using the polyshape structure that can...
대략 2년 전 | 0
답변 있음
Data splitting and saving to different variables
You can use structure to do that, you can read more about it in the matlab help https://fr.mathworks.com/help/matlab/ref/struct....
Data splitting and saving to different variables
You can use structure to do that, you can read more about it in the matlab help https://fr.mathworks.com/help/matlab/ref/struct....
대략 2년 전 | 1
답변 있음
finding a specific element based on conditions
1) Your data are row vectors and not column vectors which is why your table statement does not lead to what you expect. Tran...
finding a specific element based on conditions
1) Your data are row vectors and not column vectors which is why your table statement does not lead to what you expect. Tran...
대략 2년 전 | 0
| 수락됨
답변 있음
How to repeat value in Cell using MATLAB
Hello, I don't know if there is a builtin matlab function to do what you want, this should work: Value = {1,2,3} Count = {2,1,...
How to repeat value in Cell using MATLAB
Hello, I don't know if there is a builtin matlab function to do what you want, this should work: Value = {1,2,3} Count = {2,1,...
대략 2년 전 | 0
답변 있음
how to fill a new vector after a if condition?
I would convert your segment coordinates to points, this way points that are not unique would show that the segment is not an en...
how to fill a new vector after a if condition?
I would convert your segment coordinates to points, this way points that are not unique would show that the segment is not an en...
대략 2년 전 | 0
| 수락됨
답변 있음
Speeding up integration within nested for loops
One trick I know to increase speed of calculation is to vectorize your code. I'm not sure that would work for you but you could ...
Speeding up integration within nested for loops
One trick I know to increase speed of calculation is to vectorize your code. I'm not sure that would work for you but you could ...
대략 2년 전 | 0
| 수락됨
답변 있음
Merging Cell Array Elements in One Element
test= [{'1A'} {'2B'} {'3C'} {'4D'}] {cell2mat(test')}
Merging Cell Array Elements in One Element
test= [{'1A'} {'2B'} {'3C'} {'4D'}] {cell2mat(test')}
대략 2년 전 | 0
답변 있음
Storing elements of product in a row matrix and extracting the nonzero elements
The problem of your code is that you assign the results of your multiplaction to n, which mean that you will only store the last...
Storing elements of product in a row matrix and extracting the nonzero elements
The problem of your code is that you assign the results of your multiplaction to n, which mean that you will only store the last...
2년 초과 전 | 0
답변 있음
Combining two vectors into a new one
I don't know if there is a builtin function to do that but you can achieve using translation, logical condition and find: A = ...
Combining two vectors into a new one
I don't know if there is a builtin function to do that but you can achieve using translation, logical condition and find: A = ...
2년 초과 전 | 1
| 수락됨
답변 있음
How to write an 'if' script that changes a function depending on x?
you need to use elseif for secondary condition in your if statement: function y=funk(x) if x <= 3; y=sin...
How to write an 'if' script that changes a function depending on x?
you need to use elseif for secondary condition in your if statement: function y=funk(x) if x <= 3; y=sin...
2년 초과 전 | 0
답변 있음
How do I calculate the moment of force due to a load distribution or at least get a point of application?
Assuming you have an XY array of data, dividing it in two part can be done by filtering the data against a chosen criteria: XYd...
How do I calculate the moment of force due to a load distribution or at least get a point of application?
Assuming you have an XY array of data, dividing it in two part can be done by filtering the data against a chosen criteria: XYd...
2년 초과 전 | 0
답변 있음
what is the efficient way to search for value in a large struct
I'm not sure that fits what you want but you could try making large arrays in a small structure instead of the opposite: tree(1...
what is the efficient way to search for value in a large struct
I'm not sure that fits what you want but you could try making large arrays in a small structure instead of the opposite: tree(1...
2년 초과 전 | 0
답변 있음
Making a Surface plot transparent
I think FaceAlpha does work but your mesh size is so small that you only see the edges plotted which are not transparent in your...
Making a Surface plot transparent
I think FaceAlpha does work but your mesh size is so small that you only see the edges plotted which are not transparent in your...
2년 초과 전 | 0
답변 있음
How to improve my inefficient code?
(modified from comment to get rid of empty rows) Maybe this would work for you ? %transform your table in an array workdat...
How to improve my inefficient code?
(modified from comment to get rid of empty rows) Maybe this would work for you ? %transform your table in an array workdat...
2년 초과 전 | 0
| 수락됨
답변 있음
How to reduce code lines for data post-processing by using for-loops?
You can use structure to organize your data and simplify your analysis. For example you can define the path of the file you want...
How to reduce code lines for data post-processing by using for-loops?
You can use structure to organize your data and simplify your analysis. For example you can define the path of the file you want...
2년 초과 전 | 1
| 수락됨
답변 있음
I need help in the code. what am I doing wrong?
Hi, I think you can just add a check for a ':' character in your code. Alternatively you can also use regular expression to do ...
I need help in the code. what am I doing wrong?
Hi, I think you can just add a check for a ':' character in your code. Alternatively you can also use regular expression to do ...
거의 3년 전 | 0
| 수락됨
답변 있음
How can I plot (scatter diagram) three data series at the same time?
Hello Robert, You can use conditional statement inside an array call to filter it with your wanted data: myarray = [500,1,2;50...
How can I plot (scatter diagram) three data series at the same time?
Hello Robert, You can use conditional statement inside an array call to filter it with your wanted data: myarray = [500,1,2;50...
거의 3년 전 | 0
| 수락됨
답변 있음
finding equal (lon,lat) in another matrix of different size
I'm not sure exactly what you mean by A is bigger than B, if you can give a simple example of A and B it would help in helping y...
finding equal (lon,lat) in another matrix of different size
I'm not sure exactly what you mean by A is bigger than B, if you can give a simple example of A and B it would help in helping y...
거의 3년 전 | 1
| 수락됨
답변 있음
How to plot multiple circles within a circle by using a for-loop for radius/center position?
Hi, I have been working with somewhat similiar plotting needs. To plot circles I used the polyshape built-in function with the ...
How to plot multiple circles within a circle by using a for-loop for radius/center position?
Hi, I have been working with somewhat similiar plotting needs. To plot circles I used the polyshape built-in function with the ...
거의 3년 전 | 0
| 수락됨
질문
Strange result of find function
Hello, I noticed a strange results of the find function today. I am using the find function to extract the indices of a time s...
거의 3년 전 | 답변 수: 1 | 0