답변 있음
extracting only numeric part from cell array includes character and number
You can use regular expressions on this to filter out data you need. Example a = regexp(data,'[0-9]+.[0-9]+', 'match')%all ...

8년 초과 전 | 1

| 수락됨

답변 있음
Link a GUI with Simulink
Most blocks in Simulink have a realtimeobject property from where you can get the run time value. If your block doesn't support ...

8년 초과 전 | 0

| 수락됨

답변 있음
Open new files in existing session
This might help you. <https://in.mathworks.com/matlabcentral/answers/93468-why-is-a-new-instance-of-matlab-opened-when-i-doub...

8년 초과 전 | 0

답변 있음
How to add more data points in Signal Builder?
You can define the signal in excel and import it into signal builder (using File->import from file). This is by far the easiest ...

8년 초과 전 | 1

답변 있음
How to create an array in simulink?
You can have a workspace variable say A=5; and use zeros(1,A) as the value in constant block.

거의 9년 전 | 0

답변 있음
Initial working folder not working?
For windows only: How do you open up matlab? Using a shortcut? right click the shortcut to see the properties "Start In:"

거의 9년 전 | 3

답변 있음
for loop - splitting data
you have to do an eval. eval(['Fish2_', num2str(i), ' = Data(1,3,i);']) instead of Fish2_i = Data(1,3,i);

거의 9년 전 | 0

| 수락됨

답변 있음
How to change Simulink preferences on the fly?
AutoSave etc are not model properties. They are simulink properties (applicable to all simulink models). So you should use set_...

거의 9년 전 | 3

| 수락됨

질문


How to give timeseries "like" value to a constant block?
Hello, For example, i need my constant block to give value x at time 0s, y at time 0.025s, z at 0.05s and so on.. How should I ...

거의 9년 전 | 답변 수: 0 | 1

0

답변

답변 있음
Operands to the || and && operators must be convertible to logical scalar values?
You are setting app.hum and app.gen to double values (1, 2 etc) . But why are you comparing them to strings ? i.e., *'1', '2'*

거의 9년 전 | 0

답변 있음
reading excel and doing computation on the same excel with .exe created for the .m file
data = xlsread('a','A3:A121') Why is a in quotes here??? It should be like below. data = xlsread(a,'A3:A121')

거의 9년 전 | 0

| 수락됨

답변 있음
Merging different cell arrays
%% Number of files to merge. NumberOfDataset = 18; for i = 1:NumberOfDataset % get allfiles matching the pattern '...

거의 9년 전 | 0

답변 있음
Can I change sampling time of block (in Simulink Model) Dynamically?
During Simulation? NO. Before simulation? Programatically? YES check set_param

거의 9년 전 | 0

| 수락됨

답변 있음
How to generate this(discribed below) type of signal using signal generator or PWM inverter in simulink ?
You can use a signal builder block . It is much easier..In signal builder You can draw the signal directly, or import from an ex...

거의 9년 전 | 0

| 수락됨

답변 있음
Output argument 'ledval1' is not assigned on some execution paths.
Yes, you have three output values - ledval1,ledval2,ledval3. for example, if torque is 60, only ledval2 is assigned. Other two ...

거의 9년 전 | 0

답변 있음
Missing a Display command? Wrong syntax?
use disp (n),disp(W) instead of disp (n),(W)

거의 9년 전 | 0

답변 있음
Is there a way to make Simulink run automatically when I run a MATLAB m file?
If you want to load simulink while running the m file, you can simply call simulink in your code. If you want to open a...

거의 9년 전 | 1

| 수락됨

답변 있음
Merge multiple presentations into a single presentation
Did you try this? https://in.mathworks.com/matlabcentral/fileexchange/340-saveppt

거의 9년 전 | 0

| 수락됨

답변 있음
Determine the grade distribution based on the letter grade?
If A to E are your fixed grades, you can iterate through grades and count the occurrences. agraders=0; bgraders = 0; and s...

거의 9년 전 | 0

답변 있음
How can i get required number of sample from simulink to workspace?
Resample the data. For example, >> a = zeros(1000001,1); % Some data >> b = a(1:1000:end); % Take every 1000th data ...

거의 9년 전 | 0

답변 있음
How to a GUI directly in Simulink Model?
You can invoke a gui from a block. Create an empty subsystem. In its open function, you can call the GUI. In the GUI you can set...

거의 9년 전 | 0

| 수락됨

답변 있음
Heart Rate by category
use *csvread* to read the csv file. you can then use the *sort* function or *hist* function for your need.

거의 9년 전 | 1

답변 있음
convert 1x1 struct mat file to xlsx
First get all members of the structure using *fields* command. Then iterate over the structure and write values in the excel ...

거의 9년 전 | 0

답변 있음
Store Simulink timeseries data in txt file
timeseries is a special data class. It is best written in a mat file. If you just need the *Data*, you can Try fwrite.. do...

거의 9년 전 | 0

답변 있음
Setting popup menu strings from excel
I think you should update the popupmenu string from upload call back itself. This will update the data on the poupmenu once t...

거의 9년 전 | 0

| 수락됨

답변 있음
how to use Continue statement to compare between 2 cells and get their content only one time ?
If cell1 and cell2 are cell array of strings, you can use intersect.

거의 9년 전 | 0

답변 있음
Data store memory can not set initial value using set_param
use this set_param(listMask{1},'InitialValue','test') listMask(1) and listMask{1} are different.

거의 9년 전 | 0

| 수락됨

답변 있음
Why does my data have more than 2 dimensions?
test = test(:,:)' will convert your 1x1x18001 to 18001x1

거의 9년 전 | 1

| 수락됨

답변 있음
Creating a vector Y with 18 elements, where each element will be 3 times the position of minus 9.
y=1:1:18; y=3*y-9; y=1:1:18 creates an array y, with elements starting from 1 to 18 with a difference of 1 between the a...

거의 9년 전 | 0

| 수락됨

더 보기