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

8 years ago | 0

| accepted

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

8 years ago | 0

| accepted

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

8 years ago | 0

| accepted

Answered
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')

8 years ago | 0

| accepted

Answered
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;

8 years ago | 0

| accepted

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

8 years ago | 1

| accepted

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

8 years ago | 0

Answered
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

8 years ago | 0

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

8 years ago | 0

| accepted

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

8 years ago | 0

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

8 years ago | 0

| accepted

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

8 years ago | 0

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

8 years ago | 0

| accepted

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

8 years ago | 1

Answered
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 "=".

8 years ago | 0

Answered
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');

8 years ago | 0

| accepted

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

8 years ago | 1

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

8 years ago | 0

| accepted

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

8 years ago | 0

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

8 years ago | 1

| accepted

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

8 years ago | 0

| accepted

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

8 years ago | 0

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

8 years ago | 2

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

8 years ago | 0

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

8 years ago | 0

| accepted

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

9 years ago | 1

Answered
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');

9 years ago | 1

| accepted

Answered
xlswrite with formula in loop function
num2str(II), e.g. num2str(3)

9 years ago | 0

Load more