Beantwortet
How do I change the save file format in excel using activeX in Matlab
Worked like a charm, in R2018b, MS Office 2016. file = 'Book1.xlsx'; sheet = 'Sheet1'; excel = actxserver('Excel.Applicatio...

mehr als 7 Jahre vor | 0

Beantwortet
i've got a license problem. i've matlab student license. , my computers harddisks has a problem and i tried to fix it but i cant. after that i changed harddisk and i cloned old harddisk to new disk. and my matlab gives to me license problem. fix?
Log into your Mathworks account, de-activate and then re-activate Or activate directly from MATLAB, Help->Licensing->Activate S...

mehr als 7 Jahre vor | 0

Beantwortet
How can I tell Simulink Embedded Coder to get its variable names from my signal names, not the source block names?
Select the signal line, right click, select "Properties" Provide the signal name (e.g. "c" ), check "Signal name must resolve t...

mehr als 7 Jahre vor | 0

Beantwortet
How can I create a function to access substructure values?
Using dynamic field names, you don't even need the function. But if you do, it is quite simple. structName.(dynamicExpression) ...

mehr als 7 Jahre vor | 1

| akzeptiert

Beantwortet
Add table variable (addvars) with changing variable names
Seems no problem running the following code: clear; A=1; A1=2; A2=3; B=who('A*') T=table; addvars(T,B);

mehr als 7 Jahre vor | 0

Beantwortet
who provided the fmu-matlab-setup scripts?
In your MATLAB, clik the "Add-ons" icon, then "Get Add-ons", search for "Tool-coupling".

mehr als 7 Jahre vor | 0

Beantwortet
Copying a block and dynamically changing the name and sub block names.
The question is not very clear. You might be able to use gcb, gcbh, getfullname().

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
Can't run my simulation because of integrator. Error pop ups plz help!!!
You have the Clock as the input. Clock starts from zero when you start the simulation. Taking 1/u of zero results infinite.

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
How to put a char text to a existing panel
text() is to add text to an axes. use uicontrol() with "style" as "text".

mehr als 7 Jahre vor | 0

Beantwortet
how can solve breakingpoint in simulink ?
The values in lookup_in must be monotonically increasing. Right now it is not. The third value is not regarded as larger than ...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
Error with s-function when simulink system is called within a matlab function
You need to specify the srcworkspace as 'Parent'.

mehr als 7 Jahre vor | 0

Beantwortet
How to use a variant sink depending on its input
I think the "Variant Sink" block is un-necessary. If you want to stop the simulation when any of the output goes nagative, then ...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
Open a file according to text box value.
Why don't you make the push button to call [filename, pathname]=uigetfile() to select the file? Then you can use the text box to...

mehr als 7 Jahre vor | 0

Beantwortet
Use spreadsheet time input for simulation timestep?
Theoritically you can't specify the exact simulation time as it is determined by other factors such as accuracy or tolerance. Th...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
How to get information on a Simulink.Signal data store?
Just like you did in the script, as long as you know the Simulink.Signal object name. To get the data type: DataStore.DataType ...

mehr als 7 Jahre vor | 0

Beantwortet
Does the Simulink State-Space block use the Matlab function "lsim"?
The Simulink State-Space block is one of the ways to specify a linear system. The simulation method (or solver) is specified in ...

mehr als 7 Jahre vor | 1

Beantwortet
there is something in the figure that I want to be deleted
Hover over the "yellow box", left click and then press the "Delete" key It is the "Data Cursor". You can see that icon on the t...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
How do I save a figure with the same file name as its title within a for loop?
saveas(gcf, Y{k}, 'fig')

mehr als 7 Jahre vor | 1

| akzeptiert

Beantwortet
Retrieving only one field in a struct
value=getfield(X,'z')

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
How to transpose a cell array converted into a character arrray?
a={'Green','Blue','Red'}; b=a'; aa=char(a); bb=char(b); isequal(aa,bb) Both aa and bb are 3x5 char array and they are ide...

mehr als 7 Jahre vor | 0

Beantwortet
Modify cell array contents?
mat2cell(A{1},1,[2 2 2])

mehr als 7 Jahre vor | 0

Beantwortet
Covert matrix to sub-matrices
reshape()

mehr als 7 Jahre vor | 0

Beantwortet
Can i use the same MATLAB function in Simulink multiple times?
I would assume so. Just create that function and save it in your MATLAB path and then call it in your MATLAB Function block. You...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
delay in Simulink Matlab function block
It looks like the Delay block in Simulink could meet your need.

mehr als 7 Jahre vor | 0

Beantwortet
Is it possible to merely set an "upper limit " in Saturation block, that is, an potential negative infinite lower limit?
Try to set it as -realmax or -inf.

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
How to produce and save in a variable a list of a folder's files?
a=dir('*.mat'); b={a.name}

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
How to use "dir" command to get desired files in a folder?
dir('ign*.txt') and dir('ifs*.txt') should be able to separate them.

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
Simulink S-Function Output Ports
This is not a Simulink S-function. It is a MATLAB Function block. Anyway, as you've shown in your attached image, just explici...

mehr als 7 Jahre vor | 0

Beantwortet
How to split vector to seqences
reshape(x,3,[]) reshape(x,[],3)

mehr als 7 Jahre vor | 0

Beantwortet
Separately license additional toolboxes
Yes. I've done this for a long time. If you look at this document, you'll find that there are many ways to specify the license ...

mehr als 7 Jahre vor | 2

| akzeptiert

Mehr laden