Erivelton Gualter
Cleveland State University
Followers: 0 Following: 0
Feeds
提问
How to replace string that perfectly matchs the string?
The title might be a litle vague, but I am looking to replace a string on a text by another string using regexprep or any other ...
4 years 前 | 1 个回答 | 0
1
个回答提问
Replace group of special character with a single character
Hello everyone, I have a question related to regular expression. Let's say I have the following string: str = vertcat(... ...
4 years 前 | 1 个回答 | 0
1
个回答已回答
how can i read data given from a txt file and plot graph
You may check this other anser related to import data: https://www.mathworks.com/matlabcentral/answers/460098-import-text-data-...
how can i read data given from a txt file and plot graph
You may check this other anser related to import data: https://www.mathworks.com/matlabcentral/answers/460098-import-text-data-...
5 years 前 | 0
已回答
Randomly dividing an integer (non-uniform distribution)
How about you generate n variable from a desired range. For example: n = (b-a)*rand(1,M)+a; So you have, % Range a = 0.01; ...
Randomly dividing an integer (non-uniform distribution)
How about you generate n variable from a desired range. For example: n = (b-a)*rand(1,M)+a; So you have, % Range a = 0.01; ...
5 years 前 | 1
已回答
How to smooth the plot graph?
After you plot the position profile add the following code: for i=5:30; p = polyfit(time, theta,i); y1 = polyval(p,ti...
How to smooth the plot graph?
After you plot the position profile add the following code: for i=5:30; p = polyfit(time, theta,i); y1 = polyval(p,ti...
5 years 前 | 0
已回答
Runge Kutta 4th order
Your code seems to have some issues. Try this one: h = pi/10; x = 0 : h : 2*pi; n = length(x); y = zeros(2,n); y(:,1) =...
Runge Kutta 4th order
Your code seems to have some issues. Try this one: h = pi/10; x = 0 : h : 2*pi; n = length(x); y = zeros(2,n); y(:,1) =...
5 years 前 | 1
| 已接受
已回答
How to view plotting in real time
Hi Mekala, Alternatevely, you can run the follow code: x = [1,2,3,4,5,6,7,8,9]; y = [1,2,3,4,5,6,7,8,9]; figure; hold on...
How to view plotting in real time
Hi Mekala, Alternatevely, you can run the follow code: x = [1,2,3,4,5,6,7,8,9]; y = [1,2,3,4,5,6,7,8,9]; figure; hold on...
5 years 前 | 1
| 已接受
已回答
Using specific color vector in plot
Hi Kelsey, You need to use the attribute 'color'. See the following example: plot([0 1], [0 1], 'color', [1 0 0])
Using specific color vector in plot
Hi Kelsey, You need to use the attribute 'color'. See the following example: plot([0 1], [0 1], 'color', [1 0 0])
5 years 前 | 0
| 已接受
已回答
lambda function with if statement
You can use the following line of code: X = @(om) (1*(abs(om)==1) + 0*(abs(om)~=1));
lambda function with if statement
You can use the following line of code: X = @(om) (1*(abs(om)==1) + 0*(abs(om)~=1));
5 years 前 | 2
已回答
Compare output with each row and column from a table.
You might create a function to perform this task, an dyou call it as many times you desire. % function return status function...
Compare output with each row and column from a table.
You might create a function to perform this task, an dyou call it as many times you desire. % function return status function...
5 years 前 | 0
已回答
Variable changes to previously calculated value each iteration.
Since T is an array and you are using a for loop to find each value of p2(T), you should you T(i) instead of T. Check the co...
Variable changes to previously calculated value each iteration.
Since T is an array and you are using a for loop to find each value of p2(T), you should you T(i) instead of T. Check the co...
5 years 前 | 0
已回答
HOW CAN I CREATE A MATRIX FILE FROM 3 EXCEL FILES
First, there is several ways to import data into Matlab. CHeck the following link: https://www.mathworks.com/help/matlab/import...
HOW CAN I CREATE A MATRIX FILE FROM 3 EXCEL FILES
First, there is several ways to import data into Matlab. CHeck the following link: https://www.mathworks.com/help/matlab/import...
5 years 前 | 0
已回答
Count size of groups of 1's
Here is a way you can perform this: gpos = [1 1 1 0 0 1 1 0 1 1]'; [I, ~] = find(gpos == 1); k = 0; result = []; for i=...
Count size of groups of 1's
Here is a way you can perform this: gpos = [1 1 1 0 0 1 1 0 1 1]'; [I, ~] = find(gpos == 1); k = 0; result = []; for i=...
5 years 前 | 0
| 已接受
已回答
Import Text Data As a Numeric Matrix with Specific Delimiters
I am not sure about older versions of Matlab, but for R2018b you can import data by clicking with the right button in the mouse ...
Import Text Data As a Numeric Matrix with Specific Delimiters
I am not sure about older versions of Matlab, but for R2018b you can import data by clicking with the right button in the mouse ...
5 years 前 | 1
| 已接受
已回答
How to keep colorbar without changing the figure size?
You can set the desired size of the figure. For example: figure(1); % Figure 1 with out colorbar surf(peaks); % Ge...
How to keep colorbar without changing the figure size?
You can set the desired size of the figure. For example: figure(1); % Figure 1 with out colorbar surf(peaks); % Ge...
5 years 前 | 0
| 已接受
提问
Find Child Subexpressions of Symbolic Expression
I believe the function children might have a problem. Acording to the documentation it returns a cell array containing the child...
5 years 前 | 1 个回答 | 1
1
个回答已回答
How to multiply all values in the diagonal of a matrix by -1 in Matlab?
Hi Augustin, This may help you a21 = 1:1:5; c3 = tril((repmat(a21,[5 1]))'.^2, -1) + triu((repmat(a21,[5 1])).^2); ...
How to multiply all values in the diagonal of a matrix by -1 in Matlab?
Hi Augustin, This may help you a21 = 1:1:5; c3 = tril((repmat(a21,[5 1]))'.^2, -1) + triu((repmat(a21,[5 1])).^2); ...
6 years 前 | 1
已回答
plotting a plane in three dimensions including data points
Run the following code: [x y] = meshgrid(-10:1:10); z = 2.*x + 3.*y + 4; surf(x,y,z); To add the data you can add...
plotting a plane in three dimensions including data points
Run the following code: [x y] = meshgrid(-10:1:10); z = 2.*x + 3.*y + 4; surf(x,y,z); To add the data you can add...
6 years 前 | 3
| 已接受
已回答
How to hide the obscured portion of the lines in 3D line plot using plot3 command ??
You may check the properties of the surf function ( <https://www.mathworks.com/help/matlab/ref/surf.html> ). I am sure if you pl...
How to hide the obscured portion of the lines in 3D line plot using plot3 command ??
You may check the properties of the surf function ( <https://www.mathworks.com/help/matlab/ref/surf.html> ). I am sure if you pl...
6 years 前 | 0
已回答
Selecting four elements then starting again.
Check the following code. I am not sure that is what you need, but it performs what you said in my understanding. A = ...
Selecting four elements then starting again.
Check the following code. I am not sure that is what you need, but it performs what you said in my understanding. A = ...
6 years 前 | 0
| 已接受
已回答
Create a matrix that contains sine wave
Try this: t=0:0.001:1; x=zeros(5,length(t)); for fi=1:5 for i=1:length(t) x(fi,i)=sin(2*pi...
Create a matrix that contains sine wave
Try this: t=0:0.001:1; x=zeros(5,length(t)); for fi=1:5 for i=1:length(t) x(fi,i)=sin(2*pi...
6 years 前 | 1
已回答
I am using pzmap where poles and zeros are ploted but my question how can i see poles on unit circle only not zeros?
You can extract the pole and zeros and construct your model again using zpk for example. Check the following example: ...
I am using pzmap where poles and zeros are ploted but my question how can i see poles on unit circle only not zeros?
You can extract the pole and zeros and construct your model again using zpk for example. Check the following example: ...
6 years 前 | 0
| 已接受