Sergey Kasyanov
Saints Petersburg Politechnical University
Followers: 0 Following: 0
Feeds
已回答
how to get the state-space representation from the SimMechanic model?
Hello! Try to use linmode.
how to get the state-space representation from the SimMechanic model?
Hello! Try to use linmode.
2 years 前 | 0
已回答
Optimisation problem in matlab
Hello! Try that: % tune only next 2 lines L = 5;% steps in ladder Z_max = 1e2;% max Z for one R or Xl % goal Z(w) % w0 -...
Optimisation problem in matlab
Hello! Try that: % tune only next 2 lines L = 5;% steps in ladder Z_max = 1e2;% max Z for one R or Xl % goal Z(w) % w0 -...
3 years 前 | 0
已回答
Detecting missing data, tangent = 0, for given data.
Hello! The approach is very simple: get array with 1 when Y = 0 and 0 otherwise, then detect when 0 changes to 1 and 1 changes ...
Detecting missing data, tangent = 0, for given data.
Hello! The approach is very simple: get array with 1 when Y = 0 and 0 otherwise, then detect when 0 changes to 1 and 1 changes ...
3 years 前 | 0
已回答
plot arc that pass through a particular point
Hello! The simplest way is: figure; hold on; for i = 1 : size(XX,2) [~, n] = max(XX(:,i)); plot3(XX(:,i), YY(:,i) -...
plot arc that pass through a particular point
Hello! The simplest way is: figure; hold on; for i = 1 : size(XX,2) [~, n] = max(XX(:,i)); plot3(XX(:,i), YY(:,i) -...
3 years 前 | 1
| 已接受
已回答
How to get the function after solving the differential equation using Eulers method?
Hello! A = [1, -1 -1, 1]; x0 = [1 2]; dx = [0 0]; time_step = 0.1; time = 0 : time_step : 10; x = [x0,...
How to get the function after solving the differential equation using Eulers method?
Hello! A = [1, -1 -1, 1]; x0 = [1 2]; dx = [0 0]; time_step = 0.1; time = 0 : time_step : 10; x = [x0,...
3 years 前 | 0
| 已接受
提问
Symbolic matrices multipleid incorrectly
Hello! I have matrix equation: When I try to find X I get incorrect result: Check does not pass: I attach a .mat fil...
3 years 前 | 1 个回答 | 0
1
个回答已回答
Replacing matrix n column values
Hello, There are some no pretty but working solutions, n = [70, 80]; %A is MyMatrix %1 A(A(:).' < 0 &... (1:numel(A)) ...
Replacing matrix n column values
Hello, There are some no pretty but working solutions, n = [70, 80]; %A is MyMatrix %1 A(A(:).' < 0 &... (1:numel(A)) ...
3 years 前 | 0
已回答
How to get the symbolic determinant of a big matrix 13x13 size
Hello! Try to use my function GaussElimination: detM = prod(diag(GaussElimination(M, ''))); I test it. It works but I'm not s...
How to get the symbolic determinant of a big matrix 13x13 size
Hello! Try to use my function GaussElimination: detM = prod(diag(GaussElimination(M, ''))); I test it. It works but I'm not s...
3 years 前 | 0
| 已接受
已回答
how to generate permutations of N numbers in K positions
Hello! Use nchoosek function with combination of perms function. That solution is slow but does not require any side files. re...
how to generate permutations of N numbers in K positions
Hello! Use nchoosek function with combination of perms function. That solution is slow but does not require any side files. re...
3 years 前 | 0
已回答
I want the right coding for ploting a horizontal line with sin wave
Hello! hold on plot([x1,x2], [y,y]) Line starts in [x1, y] point and ends in [x2, y] point.
I want the right coding for ploting a horizontal line with sin wave
Hello! hold on plot([x1,x2], [y,y]) Line starts in [x1, y] point and ends in [x2, y] point.
3 years 前 | 0
已回答
why do i receive this error
Hello! You don't define f in fn function. Are you want to return f = [fy, fy2]? In that case: function f = fn( x , yic ) dy ...
why do i receive this error
Hello! You don't define f in fn function. Are you want to return f = [fy, fy2]? In that case: function f = fn( x , yic ) dy ...
3 years 前 | 1
已回答
If condition is met, find next instance of a certain value.
Hello, If you have array with values that you need to find you can use that code: values_to_find = [226 226 225 221 226 226 2 ...
If condition is met, find next instance of a certain value.
Hello, If you have array with values that you need to find you can use that code: values_to_find = [226 226 225 221 226 226 2 ...
3 years 前 | 0
已回答
Can anyone help me solve this problem using Newton's Method?
Hello, try that i = 1; V0 = [1;0];%[x0;y0] V = V0 + 1; while max(abs(V0 - V)) > 1e-10 && i < 1e2 V = V0; J = [3*...
Can anyone help me solve this problem using Newton's Method?
Hello, try that i = 1; V0 = [1;0];%[x0;y0] V = V0 + 1; while max(abs(V0 - V)) > 1e-10 && i < 1e2 V = V0; J = [3*...
3 years 前 | 0
已回答
Double checking a for loop
Hello, sum(temp/intchl) -> sum(temp)/intchl means that you divide sum of all values by sum of mean values. Lets write it in det...
Double checking a for loop
Hello, sum(temp/intchl) -> sum(temp)/intchl means that you divide sum of all values by sum of mean values. Lets write it in det...
3 years 前 | 0
已回答
How to index for saving an output of a for loop for each loop?
Hello, try that I = 0.1:0.1:0.7; Saved = zeros(4,length(I)); for i = 1:length(I) 'Calculating somestuff here' 'Use...
How to index for saving an output of a for loop for each loop?
Hello, try that I = 0.1:0.1:0.7; Saved = zeros(4,length(I)); for i = 1:length(I) 'Calculating somestuff here' 'Use...
3 years 前 | 0
| 已接受
已回答
Signal generator from .m file to simulink
Hello, you can use From Workspace block with [t', q_di'] as Data parameter.
Signal generator from .m file to simulink
Hello, you can use From Workspace block with [t', q_di'] as Data parameter.
3 years 前 | 0
| 已接受
提问
subsref works as not expected
Hello! Let's create random cell array. test = {1,2,3,4}; And try to evaluate simple code res_1 = ones(subsref(test, substruc...
4 years 前 | 1 个回答 | 0
1
个回答提问
Check that point doesnt lay on line in Simulink block diagram
Hello! I want to connect some block programatically. The simplest way for that is to add_line by points but when i add line by ...
4 years 前 | 1 个回答 | 0
1
个回答已回答
Problems with the legend function.
Hello! The simplest way is to define 'DisplayName' parameter for curves. For example: plot(-7.000,f(-7.000),'sq','MarkerSize',...
Problems with the legend function.
Hello! The simplest way is to define 'DisplayName' parameter for curves. For example: plot(-7.000,f(-7.000),'sq','MarkerSize',...
4 years 前 | 0
| 已接受
已回答
A and B must be floating-point scalars.
Hello, You need to replace i = integral (fun, x, 0, t); to one of variants below: If you want to integrate in x range (from x(...
A and B must be floating-point scalars.
Hello, You need to replace i = integral (fun, x, 0, t); to one of variants below: If you want to integrate in x range (from x(...
5 years 前 | 0
| 已接受
提问
Can I mark block as 'algebraic loop breaker'?
Hello, I create block which implement time shift in signal for some steps but Simulink decides that there is algebraic loop wit...
5 years 前 | 0 个回答 | 0
0
个回答已回答
Insert number in polynomial
Hello, You need to replace f= @(x)p; by f = symfun(p,x);.
Insert number in polynomial
Hello, You need to replace f= @(x)p; by f = symfun(p,x);.
5 years 前 | 0
提问
Using complex structure in simulink constant block
Hello, I know that there is way to pass structure to simulink model as bus object but what should I do if i need to pass comple...
5 years 前 | 1 个回答 | 0
1
个回答提问
Force output for function with no output
Hello! I am working with function handles and get error because function does not return anything. Can I force any function to ...
5 years 前 | 1 个回答 | 0
1
个回答提问
Run VBA code in MS Office through COM
Hello, I need to take some data from program through COM but that program does not working with Matlab correctly. However tha...
5 years 前 | 0 个回答 | 0
0
个回答已回答
How i can call matlab basic function if that name is accotiated with couple of functions?
The simplest way to do that is use that code: varargout = builtin('diff',varargin{:}); Also you can looking for somethin...
How i can call matlab basic function if that name is accotiated with couple of functions?
The simplest way to do that is use that code: varargout = builtin('diff',varargin{:}); Also you can looking for somethin...
6 years 前 | 0
| 已接受
提问
How i can call matlab basic function if that name is accotiated with couple of functions?
Hello, I need to call function |diff| (differences between array elements) for array of symbolic variable but matlab is using...
6 years 前 | 2 个回答 | 0
2
个回答已回答
How to solve det(s^2*M+s*C(s)+K)=0 for s as fast as posible
You can try to use that code from <https://www.mathworks.com/matlabcentral/fileexchange/67052-matlab-scripts there>: A=Ga...
How to solve det(s^2*M+s*C(s)+K)=0 for s as fast as posible
You can try to use that code from <https://www.mathworks.com/matlabcentral/fileexchange/67052-matlab-scripts there>: A=Ga...
6 years 前 | 0
已回答
Help reducing memory usage during large matrix multiplication
I think that problem can be solved by the manual multiplication of matrices. %note: V2=(V2-I*C) is the same V2(172)=V2(172)...
Help reducing memory usage during large matrix multiplication
I think that problem can be solved by the manual multiplication of matrices. %note: V2=(V2-I*C) is the same V2(172)=V2(172)...
6 years 前 | 0
已回答
How I can fix this "Signal Dimension" error message ?
You may use |Simulink/Signal Attributes/Signal Specification block|. Specify number of dimensions like that is shown on the pict...
How I can fix this "Signal Dimension" error message ?
You may use |Simulink/Signal Attributes/Signal Specification block|. Specify number of dimensions like that is shown on the pict...
6 years 前 | 1