Answered
Show full structure path as signal name in Simulink
I don't think Simulink can show that. It might be too long to display when there are many layers of hierarchy. You can get th...

8 years ago | 0

Answered
"Error using xlsread, Worksheet 'Sheet1' not found. " I have this eror and I don't know why. I have the sheet and it's in the folder which I have my script and functions.
You have the Excel file in that folder but do you have a sheet named "Sheet1" in that Excel file?

8 years ago | 0

Answered
How to reshape a matrix in a specific way?
A=reshape(1:40,10,4); B=[A(1:2:10,:) A(2:2:10,:)]

8 years ago | 0

Answered
Dot product of a column vector by its own elements
a=[-0.0022 -0.0131 0.9999]; b=[-0.8062 0.2794 0.5216]; c=[-0.9325 0.0547 -0.3570]; M=[a;b;c] M...

8 years ago | 0

Answered
struct to excel data saving
S=[Cars(:)]; writetable(struct2table(S),'test.xlsx'); winopen test.xlsx

8 years ago | 1

| accepted

Answered
Why will my data repeated itself when writing to Excel?
I know xlswrite() has this type of problem. If the Excel file already exists, it writes the data to the existing sheet without w...

8 years ago | 0

Answered
Getting error "Your MATLAB license will expire in 26 days. Please contact your system administrator or MathWorks to renew this license."
I had this before. You are using a central license server. Many times the license/maintenance cost are paid month by month by yo...

8 years ago | 0

Answered
How to detect if any numbers in an array are equal
A=[1 2 2 5 5 7 7]; [UniA,IA]=unique(A); index=setdiff(1:numel(A),IA); A(index)=A(index)+0.001

8 years ago | 1

| accepted

Answered
Insert Custom Code into Built Code (Simulink Embedded Coder)
In your version of Simulink, check Simulink Coder, Custom Code, Model Source block. It allows to add source code at either Top o...

8 years ago | 0

Answered
How to read all sheets from an excel and output them
Your code above already reads the data from all the sheets, i.e. data{1} contains the data from the first sheet, ..., data{8} co...

8 years ago | 2

Answered
simulink double value into a logical type error
B2 is logical. B2 = B2 + bwselect(u, c, r, 8) should be B2 = or(B2,bwselect(u, c, r, 8))

8 years ago | 0

Answered
How to search a substring in a list of strings?
s={'xx', 'abc1', 'abc2', 'yy', 'abc100'}; index=cellfun(@any,strfind(s,'abc')); s(index)

8 years ago | 0

Answered
How to create sequence datetime in matlab by specific duration
t1:minutes(15):t2

8 years ago | 1

| accepted

Answered
Why is my modified path not saved in MATLAB when I only have one pathdef.m?
Ruan flag=savepath to see if there is any file access issue. savepath returns: 0 if the file was saved successfull...

8 years ago | 0

| accepted

Answered
For loop: saving variables for each iteration
Add a few lines to create your desired output in a text file. fid=fopen('output.txt','w+t'); fprintf(fid,'j . MyTrial\...

8 years ago | 0

| accepted

Answered
save data form matlab to .txt
csvwrite()

8 years ago | 0

| accepted

Answered
Find by command line (.m script) the Source File for a loaded model
bdroot(gcs) or bdroot(gcb) might be what you need.

8 years ago | 0

| accepted

Answered
Simulink with block using external sfunction throws Unable to find makefile when generating code using embedded coder
The S-function ab_sf.mexw64 was created using "mex" command from its source code (for example, source C code) together with some...

8 years ago | 0

| accepted

Answered
xlsread works in 2015b but not in 2017b
I ran your command with your file in R2017b. No errors. Out_data was read. The error message complains the line 113 in xlsrea...

8 years ago | 0

Answered
"See" variable inside a function before it returns?
May I suggest waitbar(), adding inside your function? For example h = waitbar(0,'Please wait...'); for i=1:...

8 years ago | 0

Answered
How can I use InputParser with multiple argument names?
Since "PartialMatching" is true by default, do_something('f',2) is same as do_something('factor',2) if you don't have another pa...

8 years ago | 0

Answered
Reset integrator no initial condition in Simulink
I would insert a "Unit Delay" block after the "Gain" block and feed the output to "X0" port.

8 years ago | 0

Answered
What do the prefixes of "db_", "na_", "jc_" mean in the online help?
This might surprise you. These prefix letters in many of the IDs of the MAAB (Mathworks Automotive Advisory Board) guideline rul...

8 years ago | 0

Answered
Is there a function to do this?
With this, will you be able to work out the function? >> sprintf('%04d',12) ans = '0012'

8 years ago | 0

Answered
I have large data vector 437780x1 length. I want to make average vector of data length. I am doing this by using this instruction: avgVector = avg * ones(length(data));
This is a common trap. ones(3) is a 3x3 matrix, not a 3x1 or 1x3 vector. Use ones(size(data)) instead.

8 years ago | 0

Answered
Reading dates/times into MATLAB and saving as a numeric vector
Don't worry. The precision is kept. a=datenum('17.11.2017 09:57:29.96'); b=datenum('17.11.2017 09:57:24.06'); datestr...

8 years ago | 0

Answered
convert seconds to time
datestr(seconds(28225.6),'HH:MM:SS PM')

8 years ago | 6

| accepted

Answered
strings function not available on MATLAB 2013
s=cell(3,2); s(:)={''} ischar(s{3,1})

8 years ago | 0

Answered
in control, why is a simulink solution better than analytic?
If you can draw a handwritten solution, you are smart. But other people may not be able to understand it. Many times, I can't...

8 years ago | 0

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

8 years ago | 0

Load more