Answered
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 years ago | 1

| accepted

Answered
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 years ago | 0

| accepted

Answered
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 years ago | 0

Answered
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 years ago | 1

Answered
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 years ago | 0

Answered
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 years ago | 3

Answered
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 years ago | 0

| accepted

Answered
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 years ago | 3

| accepted

Question


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 years ago | 0 answers | 1

0

answers

Answered
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 years ago | 0

Answered
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 years ago | 0

| accepted

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

9 years ago | 0

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

9 years ago | 0

| accepted

Answered
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 years ago | 0

| accepted

Answered
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 years ago | 0

Answered
Missing a Display command? Wrong syntax?
use disp (n),disp(W) instead of disp (n),(W)

9 years ago | 0

Answered
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 years ago | 1

| accepted

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

9 years ago | 0

| accepted

Answered
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 years ago | 0

Answered
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 years ago | 0

Answered
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 years ago | 0

| accepted

Answered
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 years ago | 1

Answered
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 years ago | 0

Answered
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 years ago | 0

Answered
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 years ago | 0

| accepted

Answered
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 years ago | 0

Answered
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 years ago | 0

| accepted

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

9 years ago | 1

| accepted

Answered
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 years ago | 0

| accepted

Load more