답변 있음
string variable arguments in set_param
p1x2(1,1) is cell, use p1x2{1,1} or define onOffTable = ["on","off"] if your MATLAB version support string data type

거의 5년 전 | 0

답변 있음
Get Simulation Phase of Simulink Model
Check the status of a simulation. get_param('ModelName','SimulationStatus') The software returns 'stopped', 'initializing', 'r...

거의 5년 전 | 1

| 수락됨

답변 있음
How a Integrator followed by a saturation block is different than a limited integrator?
I think it can be explained. An Integrator followed by a Saturation. The integrator just does its regular integration and the ...

거의 5년 전 | 0

답변 있음
How to solve a system of ODE in Simulink?
If the model has already been developed in MATLAB, you could use the MATLAB Function block

거의 5년 전 | 0

답변 있음
Join two sprintf into one and show it on static field
The second set(handles.text3, 'string',...) will over-write the first one. You need to combine the string and run set() once. ...

거의 5년 전 | 0

답변 있음
How can I divide plot between different scope windows in a scope block?
You have to specify 2 input ports, Mux three and feed into port 1, Mux the other three and feed into port 2.

거의 5년 전 | 0

| 수락됨

답변 있음
Add missing numbers between elements in an array
%% Var1= [1 1 2 4 5 7 7 7 8 10 11 13 14 14 17 17 17 17 18 20]; Var2= [0.5 0.3 0.1 0.6 0.2 0.4 0.8 0.9 0.3 0.2 0.1 0.4 0.8 0.7 ...

거의 5년 전 | 0

| 수락됨

질문


Is there a way to "Save" a link to a MATLAB Answer?
I saw a question. I know the answer because I remember answering a similar one before and it was accepted. But the answer is le...

거의 5년 전 | 답변 수: 1 | 2

1

답변

답변 있음
extract all points from curves
x= [1,2,3,4,5,6,7,8,9,10] y= [1,2,3,4,5,6,7,8,9,10] in=[1.2,2.3,3.5] out=interp1(x,y,in)

거의 5년 전 | 0

| 수락됨

답변 있음
How to run Simulation for certain amount of time
Specify the start time and stop time either directly through numerical value, or through variables and then set the value for th...

거의 5년 전 | 1

| 수락됨

답변 있음
How can I reset the time reference in a triggered subsystem in Simulink?
This turns out to be harder that it seems. Branch and connect the trigger signal to the external reset port of a resetable Int...

거의 5년 전 | 0

| 수락됨

답변 있음
When using the 'set_param' function, how do I ensure that I format the parameter value properly when the parameter value is a 1xn array?
how about this a=1;b=2;c=3 mat2str([a,b,c]) ans = '[1 2 3]'

거의 5년 전 | 0

| 수락됨

답변 있음
Read specific value from XML-file
The short answer is to use xmlread(). I've done it before. The actual code depends on the schema. You may also try xml2struct()...

거의 5년 전 | 0

답변 있음
Matlab zoom window behavior in recent years
That is true but I think there is a benefit. It allows you to do x-only or y-only zoom easily. Regarding zoom outside of the li...

거의 5년 전 | 1

답변 있음
Start/Stopp in one Button
For fun, one-liner uibutton('Text','Start','ButtonPushedFcn','set(gcbo,''text'',setdiff(["Start","Stop"],get(gcbo,''text'')))')...

거의 5년 전 | 0

답변 있음
Log simulink (variable step) data with with one sample time!
You can always specify the sample time of the data logging (ToWorkspace block or signal logging). Keep in mind though that this ...

거의 5년 전 | 1

| 수락됨

답변 있음
Access Data in to APP DESIGNER from Simulink 'To Workspace' block.
Use set_param() to set 'SimulationMode' and then still run simout = sim("AppDesignSetup.slx") so it will force the log of si...

거의 5년 전 | 0

답변 있음
How to replace one subsystem with other ..
replace_block() see examples in doc

거의 5년 전 | 0

| 수락됨

답변 있음
How do I evaluate string user input with switch statement?
input('This is a prompt [y/n]','s') to input a string. Otherwise, it is for numerical.

거의 5년 전 | 0

| 수락됨

답변 있음
From workspace block error: Time values must be a real vector.
If you are using timeseries, make sure its time data is valid. For example Var=timeseries; Var.Time=[0;1]; Var.Data=[1;100] ...

거의 5년 전 | 0

답변 있음
how to zoom in
axis()

거의 5년 전 | 0

답변 있음
i want to obtain a vector that each element is subtract from the previous one
diff()

거의 5년 전 | 1

| 수락됨

답변 있음
Disable Drag and Drop
Search "how to disable drag and drop in windows" and see the steps. I assume the same risk exists in other apps if it happens to...

거의 5년 전 | 0

답변 있음
Automate the response to command prompt in matlab
There is a more secure way to do this such as using PuTTY PLINK.But if you don't mind storing and exposing your password, you co...

거의 5년 전 | 0

답변 있음
Is there a way of getting the "LoggingName" and "Source Port" of all the Logging Selected Signals directly in Matlab?
After a simulation, your signal logging data is saved as, e.g. logsout Run logsout.getElementNames and other API to get the inf...

거의 5년 전 | 0

답변 있음
Vector to matrix using assignment - Simulink
Your output is a 2x4 matrix. Using Assignment block, you could either Provide a scalar value in U, assign multiple elements of ...

거의 5년 전 | 0

답변 있음
Option to flip up-down a Simulink block not available in 2020a
You can show block name on top or bottom but there was never a up-down flip. If you want to change the position of the port, cha...

거의 5년 전 | 1

답변 있음
Is there any function in Matlab that can serve as "VLOOKUP" of Excel?
[~,index]=ismember(final1,aux2(:,1)) newData=aux2(index,:)

거의 5년 전 | 2

| 수락됨

답변 있음
Demux signal from Transform sensor (simscape multibody)
Try "Demux" or "Bus Selector" block.

거의 5년 전 | 0

답변 있음
How can I use two PID controllers in Simulink?
Your output y seems to be 2x1, but if your current model runs, then your control variable u is 1x1. You can't have two PID contr...

거의 5년 전 | 0

더 보기