Beantwortet
How to import file.dat to matlab without delimiter
out=importdata('file.dat','|')

mehr als 8 Jahre vor | 0

Beantwortet
Opening Examples On Simulink
To open this model in R2017a, you need the following Toolboxes simhydraulics (or now called Simscape Fluids) simscape ...

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
bug in lang\makeValidName.m ?
In MATLAB R2016b, no problem with your code >> S = {'Item_#','Price/Unit','1st order','Contact'}; N = matlab.lang.makeValid...

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
Reshape a single dimension of matrix
A=reshape(1:24,12,2) B=reshape(A(:),3,4,2)

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
How can I Generate separate function from different simulink subsystem. I am using Matlab 2017a. Normally in simulink all the subsystem blocks will be combined after generating code. Can anyone suggest. How can I Generate separate function from diffe
* select the subsystem block * right click * select "C/C++ Code" * select "Build This Subsystem" or "Export Functions"

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
Convert number '0000' to time format HHmm
a={'0000','930','1220'} % or a={'0','930','1220'} b=datenum(a,'HHMM') c=datestr(b,'HH:MM')

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
Creating Sawtooth graph that looks like the image below
T=2; t=-6:0.01:6; xt=(2/T).*mod(t,T/2).*sign(T/2-mod(t,T)); plot(t,xt);grid;

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
Is Simulink required for any of the financial add ons?
No.

mehr als 8 Jahre vor | 0

Beantwortet
How can i change font of "Block Parameters"
That is because you pressed "Ctrl" and "=" to zoom in. Press "Ctrl" and "-" to zoom out

fast 9 Jahre vor | 1

| akzeptiert

Beantwortet
cell to matrix when loading
d1={rand(77,1)}; d1{1}(50) d2=d1{1} d2(50)

fast 9 Jahre vor | 0

Beantwortet
As the administrator of a Windows PC, can I create a Matlab code that a user can execute, but that this user cannot neither read nor copy?
If you mean to hide the source code, please ref to pcode() doc pcode

fast 9 Jahre vor | 0

Beantwortet
How can I change the color of all similar blocks in a complex simulink system programmatically?
Something like this but modifying blocks inside library links is tricky. I would suggest you modify the library directly. Open t...

fast 9 Jahre vor | 0

| akzeptiert

Beantwortet
parseInputs(varargin{:}) related questions
Regarding parse inputs, you can type "doc parse" in MATLAB and see an example. It is a better way to write a function to have s...

fast 9 Jahre vor | 0

Beantwortet
Can I create a new overlapped figure from the one which is already plotted figure?
Here is an example: %% x=0:0.1:10; y=sin(x); figure(1); plot(x,y); grid on; xStart=4.5; index=x>=x...

fast 9 Jahre vor | 0

| akzeptiert

Beantwortet
IF-ELSE NOT FUNCTIONING PROPERLY
text11 = (20-edit1)/(1.3/sqrt(15));

fast 9 Jahre vor | 0

Beantwortet
How to check the version of Excel through Matlab?
ExcelApp=actxserver('excel.application'); str2double(get(ExcelApp,'Version'))

fast 9 Jahre vor | 0

| akzeptiert

Beantwortet
Try, Catch not working with system command.
use system() to replace the "!" to call your program. [status,result] = system('command') Use the returned "status" to d...

fast 9 Jahre vor | 1

Beantwortet
How can I use an IF function on a Global variable?
In your "if" statement, you mean to compare the value, you need to use "==" or isequal(), not "=".

fast 9 Jahre vor | 0

Beantwortet
Window title of figures in a for loop
try this, within your loop: f=figure(i); title('my title'); set(f,'Name','my window title');

fast 9 Jahre vor | 0

| akzeptiert

Beantwortet
What is the meaning of the task overrun detected output?
In your Simulink model, go to menu Display->Sample Time->All. A legend of various sample times will be shown. Hopefully, you can...

fast 9 Jahre vor | 1

Beantwortet
Is there a Simulink block that provides the difference of several signals?
I don't think there is such a special block. However, it can be done with the Sum block (used as subtraction), MinMax and Scope ...

fast 9 Jahre vor | 0

| akzeptiert

Beantwortet
round of a number 35,183
round() is to round to the nearest. You may also want to check ceil(), floor().

fast 9 Jahre vor | 0

Beantwortet
how can i plot 14 vertical lines at the same time??
line() can draw multiple lines at a time. You just need to pay attention to how to provide your data in the right format. For ex...

fast 9 Jahre vor | 1

| akzeptiert

Beantwortet
"Invalid Handle" error message occurs
Pay attention to the syntax of saveas(). The first argument should be the handle of the figure, not the path of your saved file....

fast 9 Jahre vor | 0

| akzeptiert

Beantwortet
vertical line in plot
I don't think vline() is a MATLAB built-in function. You can use line() though. x=100*(1:10); y=1000*(1:10); semilogx...

fast 9 Jahre vor | 0

Beantwortet
How to Change element values of an array with conditions?
Play golf? A=A+10*(A<6)

fast 9 Jahre vor | 2

Beantwortet
Code error "Not enough input arguments" Anyone help me, Thanks in Advance
The function expects three inputs, (s, h, data). You didn't provide any. That is the error. It looks like you have some data ...

fast 9 Jahre vor | 0

Beantwortet
I want to cycle the signal simulink according to my application i can't use any repeat blocks.How can i do it ?
It is somewhat difficult to repeat a user defined signal input in Simulink. In your case though, I can think of a solution. ...

fast 9 Jahre vor | 0

| akzeptiert

Beantwortet
displaying date as title of figure
The output of datestr() is already a string, so you don't need to use sprintf() anymore. Use datastr() directly. If you still...

fast 9 Jahre vor | 1

Beantwortet
Is it possible to script the "Icon drawing command" of the mask editor ? So that I can change it or set it from a script.
set_param(BlockHandle,'MaskDisplay','plot(1:10)'); get_param(BlockHandle,'MaskDisplay');

fast 9 Jahre vor | 1

| akzeptiert

Mehr laden