Réponse apportée
How to save multiple Matlab figures in separate folders?
use fullfile() to specify the full path of the file and saveas().

plus de 8 ans il y a | 0

Réponse apportée
Exporting Simulink models as SVG in MATLAB R2016b and beyond?
use print() with '-dsvg' f14; handle=get_param('f14','handle'); print(handle,'-dsvg','MyModel'); winopen MyModel.s...

plus de 8 ans il y a | 4

Réponse apportée
Function executing a Script - Intrested in Scripts Output
See Jan's comments above, but for your problem, use this: evalin('base','Script1')

plus de 8 ans il y a | 1

| A accepté

Réponse apportée
Getting message while converting following matlab code to c? This structure does not have a field 'numResources'; new fields cannot be added when structure has been read or used.
You are creating the structure p, adding its fields on-the-go. For example, fields "numTx", "numRx" and "numLayers" etc. are cre...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
Why Matlab 2017a needs twice more time than 2014a to run the same code?
I would suggest you contacting Mathworks' technical support for this. If you could provide your example data, I am sure they wil...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
how to validate edittext to accept only integers between 25 to 100
if num<=25 && num>=100 should be if num<=25 || num>=100

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
'Undefined function or variable ' error but variable is defined in function working in GUI
if nargin < 2 h=3; % local search window size: h=3; h=5; h=7; h=9; h=11; f=1; % padding value for window: ...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
Saving strings (ex. 0222222) from MATLAB to Excel using xlswrite is saving as a numeric.
Add a single quote in front to deal with Excel a={'"022','''022','022'} xlswrite('test.xls',a); winopen test.xls

plus de 8 ans il y a | 0

Réponse apportée
error ' Undefined function 'AND' for input arguments of type 'logical'.''
use low case, "and"

plus de 8 ans il y a | 0

Réponse apportée
How can I display a matrix with 6 decimal places accuracy?
See "help format" to see if you can find the right format format long disp(single(rand(3)))

plus de 8 ans il y a | 3

| A accepté

Réponse apportée
How to remove all rows from categorical variable corresponding to a double array?
index=and(A(:,1) > 0,B(:,1) > 0) X1=X(index,:)

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
Select nearest value on a vector for a given value
Can you use built-in function? X=10:10:100; Y=1:10; out=interp1(X,Y,12,'nearest') out=interp1(X,Y,18,'nearest')

plus de 8 ans il y a | 0

Réponse apportée
Compare segments of a vector
What if none of the element in second 5 elements is greater than the first 5 elements? The code below might be easier to underst...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
Search string and get its position in excel using Actxserver
I will just read the Excel file anyway and search the Raw data. [Num,Txt,Raw]=xlsread(fullname,sheet); Or, if 'cotton' i...

plus de 8 ans il y a | 0

Réponse apportée
Compare segments of a vector
This example should give you an idea A=transpose(reshape(rand(20,1),5,[])) B=diff(A) C=B>0 C should tell you the r...

plus de 8 ans il y a | 0

Réponse apportée
How to access all subdirectorie?
Use dir(fullfile('M:\F1','**/*.*')). It will list everything in the folder and all sub-folders.

plus de 8 ans il y a | 1

| A accepté

Réponse apportée
Hello Everyone, I'm looking for your help for the following problem
I'll provide a lead. I think the rest should be relatively easy. A = [17 14 18 15 14 19;... 1 5 3 30 8 14;... ...

plus de 8 ans il y a | 0

Réponse apportée
Is there any one who can help for the following matrix problem
I think this is the way to do it. Your expected output has typo in it. M=[15 18 14 19 17 14; 30 3 8 14 1 5;...

plus de 8 ans il y a | 1

| A accepté

Réponse apportée
Simulink - Pass mask name to blocks under mask
try this in your display command str=get_param(gcb,'nam'); disp(['Potentiometer Sensor Characteristics\n' str]);

plus de 8 ans il y a | 1

Réponse apportée
How to replace the values of a Matrix
Is this what you want? A=rand(3,10); B=rand(3,10); C=A+B; D=2.*C; for k=1:5 A=D; C=A+B; D=2.*C; ...

plus de 8 ans il y a | 0

Réponse apportée
Add a large number of comma separated numbers to a txt file
%d can be used repeatedly automatically, run this to see the effect: fprintf(1,'\n%s ',"favorite numbers"); fpri...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
m script bus selector output
'GWM_FR_BCM_A_BUS' should be an immediate element of the input bus, not the input bus itself, right? In any case, I would sug...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
Finding duplicate variables in multiple M files
Run each M-file and save a .mat file afterwards (don't forget to run "clear" first each time) VarList1=fieldnames(load('MFile...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
Refresh Mask after saving Model
You can specify a function, or lines of code in the Model Properties -> Callbacks -> PostSaveFcn. I wonder if you can do a mo...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
How to remove the display of ans on a function
TriangleA(10); Add the semicolon ; at the end

plus de 8 ans il y a | 1

| A accepté

Réponse apportée
How can I save a file with the same name as the foldername?
save (all_names(nn).name,'variable') all_names(nn).name is already a string. Your usage of it in cd() is correct

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
How to copy contents from one Subsystem into a sub subsystem within another model?
Should work as long as 'Scheduler/Scheduler' exists already. In fact I just verified.

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
How can I send variable from workspace to simulink?
If you have the variable 'a' in base workspace, double click the Constant block, put in 'a' (without the quote) under "Constant ...

plus de 8 ans il y a | 0

Réponse apportée
What is wrong with my code? How can i set parameters from an array into a block in simulink?
Most block parameters, even though they are numeric to the user, are strings when getting from get_param(). So when setting the ...

plus de 8 ans il y a | 2

Réponse apportée
Determine if a day is a bank holiday (from a matrix)
t1 = datetime(2014,1:5,1) t2 = datetime(2014,1,1) ismember(t2,t1)

plus de 8 ans il y a | 1

Charger plus