Réponse apportée
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 ...

plus de 9 ans il y a | 1

| A accepté

Réponse apportée
Closing GUI, closing MATLAB, when re-open I have the same selection, plots, everything and I can't reset them
Have you tried close force all

plus de 9 ans il y a | 0

Réponse apportée
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 ...

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 9 ans il y a | 0

Réponse apportée
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 ...

plus de 9 ans il y a | 1

Réponse apportée
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.

plus de 9 ans il y a | 0

Réponse apportée
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:"

plus de 9 ans il y a | 3

Réponse apportée
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);

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
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_...

plus de 9 ans il y a | 3

| A accepté

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 ...

plus de 9 ans il y a | 1 réponse | 1

0

réponse

Réponse apportée
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'*

plus de 9 ans il y a | 0

Réponse apportée
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')

plus de 9 ans il y a | 0

| A accepté

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

plus de 9 ans il y a | 0

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

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
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 ...

plus de 9 ans il y a | 0

Réponse apportée
Missing a Display command? Wrong syntax?
use disp (n),disp(W) instead of disp (n),(W)

plus de 9 ans il y a | 0

Réponse apportée
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...

plus de 9 ans il y a | 1

| A accepté

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

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 9 ans il y a | 0

Réponse apportée
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 ...

plus de 9 ans il y a | 0

Réponse apportée
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...

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
Heart Rate by category
use *csvread* to read the csv file. you can then use the *sort* function or *hist* function for your need.

plus de 9 ans il y a | 1

Réponse apportée
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 ...

plus de 9 ans il y a | 0

Réponse apportée
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...

plus de 9 ans il y a | 0

Réponse apportée
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...

plus de 9 ans il y a | 0

| A accepté

Réponse apportée
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.

plus de 9 ans il y a | 0

Réponse apportée
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.

plus de 9 ans il y a | 0

| A accepté

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

plus de 9 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 9 ans il y a | 0

| A accepté

Charger plus