Feeds
답변 있음
Represent data with a status bar plot
You can use bar() function with 'stacked' argument; y = [30 50 10 10]; barh(1,y,"stacked");
Represent data with a status bar plot
You can use bar() function with 'stacked' argument; y = [30 50 10 10]; barh(1,y,"stacked");
7일 전 | 0
답변 있음
What are the names of these blocks in the current Simulink r2024b
My guess: First one is a ramp block, second one is a step block, third one is a step block again but the step is done from time ...
What are the names of these blocks in the current Simulink r2024b
My guess: First one is a ramp block, second one is a step block, third one is a step block again but the step is done from time ...
4개월 전 | 0
답변 있음
Hello everyone, how can use matpower with the online matlab?
You upload the matpower.m to your matlab drive and work like that.
Hello everyone, how can use matpower with the online matlab?
You upload the matpower.m to your matlab drive and work like that.
4개월 전 | 0
| 수락됨
답변 있음
6x6 system of multivariate quadratic equations ... non-negative real solutions
fsolve seems to work for most cases, if not lsqnonlin is also an option. here is a general explanation
6x6 system of multivariate quadratic equations ... non-negative real solutions
fsolve seems to work for most cases, if not lsqnonlin is also an option. here is a general explanation
4개월 전 | 1
답변 있음
How can i define xo or intial parameters that the ga begin with ?
You use InitialPopulationMatrix of optimoptions. You can get more info on what options you can set for ga in here under InputArg...
How can i define xo or intial parameters that the ga begin with ?
You use InitialPopulationMatrix of optimoptions. You can get more info on what options you can set for ga in here under InputArg...
4개월 전 | 0
답변 있음
finding relation between two variables, being discharge and water level in a river
Here is another way using unconstarint optimization: % define some parameters c_real = 3.2965;% actual c value in q = h^c h_m...
finding relation between two variables, being discharge and water level in a river
Here is another way using unconstarint optimization: % define some parameters c_real = 3.2965;% actual c value in q = h^c h_m...
4개월 전 | 0
답변 있음
Configure model block in simscape
In simulink you can create masked systems with parameters and attach a callback to those parameters. So in the callback you can ...
Configure model block in simscape
In simulink you can create masked systems with parameters and attach a callback to those parameters. So in the callback you can ...
5개월 전 | 1
답변 있음
Unable to connect scope wit circuit output
You need to put a block for what you want to measure at that point, you can use voltage sensor block to measure the voltage and ...
Unable to connect scope wit circuit output
You need to put a block for what you want to measure at that point, you can use voltage sensor block to measure the voltage and ...
5개월 전 | 0
답변 있음
How to create a state space model with constant term and do feedback.
You can define which inputs and outputs are connected to your controller. Checkout the feedback function page and look at the 'S...
How to create a state space model with constant term and do feedback.
You can define which inputs and outputs are connected to your controller. Checkout the feedback function page and look at the 'S...
5개월 전 | 0
답변 있음
How to merge two tables into a single table?
You can add "Source" header to each table with "Table 1" or "Table 2" inputs and join them like joining arrays; table1 = table(...
How to merge two tables into a single table?
You can add "Source" header to each table with "Table 1" or "Table 2" inputs and join them like joining arrays; table1 = table(...
5개월 전 | 1
답변 있음
function zpk and linmod
Here explains how it is done. Basically you have your function that describes the relation between states and inputs. If they ar...
function zpk and linmod
Here explains how it is done. Basically you have your function that describes the relation between states and inputs. If they ar...
5개월 전 | 0
답변 있음
How to calculate Average without receiving 'Inf' as a result.
Here is one way: % create dummy matrix A = rand(100,1); A([5 10 24 55 23 60]) = inf; A([12 56 29 35]) = nan; mean(A) % s...
How to calculate Average without receiving 'Inf' as a result.
Here is one way: % create dummy matrix A = rand(100,1); A([5 10 24 55 23 60]) = inf; A([12 56 29 35]) = nan; mean(A) % s...
5개월 전 | 0
답변 있음
writematrix: how to get formatted txt-output?
Use 'tab' delimiter option instead of single space. M = [100 0 4500;0 1 38.29;1 1 38.22]; writematrix(round(M,2),'file.txt',...
writematrix: how to get formatted txt-output?
Use 'tab' delimiter option instead of single space. M = [100 0 4500;0 1 38.29;1 1 38.22]; writematrix(round(M,2),'file.txt',...
6개월 전 | 0
답변 있음
Simulate recursive function in simulink
I did not care about the dimensions at all while creating the simulink model so some adjustment might be necessary but this is o...
Simulate recursive function in simulink
I did not care about the dimensions at all while creating the simulink model so some adjustment might be necessary but this is o...
6개월 전 | 0
답변 있음
Add NaN in the first row of a table
Assuming all your entries are numeric, since you want to assign NaN, here is one way; % create dummy table Age = [38;43;38;40;...
Add NaN in the first row of a table
Assuming all your entries are numeric, since you want to assign NaN, here is one way; % create dummy table Age = [38;43;38;40;...
6개월 전 | 0
답변 있음
Error in displaying the whole matrix
Ther eis probably a 1e6 at the top of the display. You can do 'format bank' to mitigate this if you want or any other format opt...
Error in displaying the whole matrix
Ther eis probably a 1e6 at the top of the display. You can do 'format bank' to mitigate this if you want or any other format opt...
7개월 전 | 0
| 수락됨
답변 있음
How to update a function with output from another function?
Here is one way iff the required variables are within the state vector 'y', then you can do: %% change ode45 call [t, y] = ode...
How to update a function with output from another function?
Here is one way iff the required variables are within the state vector 'y', then you can do: %% change ode45 call [t, y] = ode...
7개월 전 | 0
답변 있음
slow drawing of a set of points on a plane
In essence for loop are always slower. So try to vectorize your code whereever possible for efficiency, here is a good read. In ...
slow drawing of a set of points on a plane
In essence for loop are always slower. So try to vectorize your code whereever possible for efficiency, here is a good read. In ...
7개월 전 | 0
| 수락됨
답변 있음
plot magnitude data at location (x,y,z)
Here is one way where you use colors to indicate the magnitude; % random data x = [0:pi/50:10*pi nan]; % nan is added to remov...
plot magnitude data at location (x,y,z)
Here is one way where you use colors to indicate the magnitude; % random data x = [0:pi/50:10*pi nan]; % nan is added to remov...
7개월 전 | 0
답변 있음
Generate the motion (Trajectory) of a sphere (or point) with given velocity value
If you dont care about the actual timing and things, here is one way where the colors of the path indicate the speed and a simpl...
Generate the motion (Trajectory) of a sphere (or point) with given velocity value
If you dont care about the actual timing and things, here is one way where the colors of the path indicate the speed and a simpl...
7개월 전 | 0
답변 있음
How to generate vector with non-linear spacing?
The answer from another question here: A = 1; B = 5; std = .9; % need to play with this to get desired shape within desired r...
How to generate vector with non-linear spacing?
The answer from another question here: A = 1; B = 5; std = .9; % need to play with this to get desired shape within desired r...
7개월 전 | 0
답변 있음
Second Order Laplace solving doesn't work ('Unable to find explicit solution')
Not sure the underlying reason behind it but you are defining the X as a function of s and solve function seems to be having tro...
Second Order Laplace solving doesn't work ('Unable to find explicit solution')
Not sure the underlying reason behind it but you are defining the X as a function of s and solve function seems to be having tro...
7개월 전 | 0
| 수락됨
답변 있음
How do I solve system of differentials using ode45 and eom functions
You defined a symbolic variable within your ode function, which is a nono if you wanna solve it numerically :D function ds = e...
How do I solve system of differentials using ode45 and eom functions
You defined a symbolic variable within your ode function, which is a nono if you wanna solve it numerically :D function ds = e...
7개월 전 | 1
| 수락됨
답변 있음
Solving with ode45 with a solution dependant variable in the ode
No, you should not do it that way. Instead you should create your function properly in a way that represents the equations. It w...
Solving with ode45 with a solution dependant variable in the ode
No, you should not do it that way. Instead you should create your function properly in a way that represents the equations. It w...
7개월 전 | 0
답변 있음
How to display a color bar in Matlab as shown below
You can call the colorbar function with the desired tick values Z = peaks; contourf(Z) colorbar('ticks',[-6:0.5:8])
How to display a color bar in Matlab as shown below
You can call the colorbar function with the desired tick values Z = peaks; contourf(Z) colorbar('ticks',[-6:0.5:8])
7개월 전 | 1
답변 있음
Error in for loop: Index exceeds matrix dimensions.
You have essentially made two mistakes: matrix_f only has 6 rows. You setup up your for loop such that k is 1 2 3 4 5 6 . When ...
Error in for loop: Index exceeds matrix dimensions.
You have essentially made two mistakes: matrix_f only has 6 rows. You setup up your for loop such that k is 1 2 3 4 5 6 . When ...
7개월 전 | 0
| 수락됨
답변 있음
Friend Function implementation in MATLAB
You can use the Access List property. Here is more explanation. Here also.
Friend Function implementation in MATLAB
You can use the Access List property. Here is more explanation. Here also.
7개월 전 | 0
답변 있음
how to do rising and falling edge in single signal using signal builder..?
Click on Signal->ReplaceWith or New->Square and play with the points. Alternatively, click on Signal->Custom-> enter your time...
how to do rising and falling edge in single signal using signal builder..?
Click on Signal->ReplaceWith or New->Square and play with the points. Alternatively, click on Signal->Custom-> enter your time...
7개월 전 | 1
| 수락됨
답변 있음
how to make task in simulink
You can specify sample time of each block seperatly. Here is more information and how to do it for different blocks, subsystems ...
how to make task in simulink
You can specify sample time of each block seperatly. Here is more information and how to do it for different blocks, subsystems ...
7개월 전 | 0