Answered
Recovering text between parentheses using regexp
exp = '[^()]*'; should be it.

8 years ago | 2

| accepted

Answered
How to take last entry of each unique name
use [out, IA]=unique(in,'last'), assume your 2D cell array is in, [out,IA]=unique(in(:,4),'last') out=in(IA,:)

8 years ago | 2

| accepted

Answered
Daily prices from hourly time series
This might work. Assume you import your data into a 8520x2 matrix A B=reshape(A,24,2,[]) C=mean(B,1)

8 years ago | 0

Answered
How can I create an impulse (delta) signal in Simulink?
From the note of impulse(): Note: In discrete time, impulse computes the response to a unit-area pulse of length Ts and...

8 years ago | 0

Answered
copyfile: The system cannot find the path specified
use exist(source,'file') to see if the file exists first. Your source file name contains multiple "." and "-'

8 years ago | 1

| accepted

Answered
How to remove cells that look seemingly like newline character from cell array?
It might not be new line. Use double() and char() to do the match. double(Dataset{3}) to find out the value of the character,...

8 years ago | 0

| accepted

Answered
Dataset to Square Wave
a little awkward, but should serve you well x=[0 32 37 45 53]'; y=[0 1 0 1 0]'; a=x([2:end,end]); a=reshape([x...

8 years ago | 0

| accepted

Answered
How do I acess elements of a matrix with round indexes without loops?
A(2:2:end)=A(2:2:end)*2

8 years ago | 1

| accepted

Answered
Is it possible to input an N-by-M signal (matrix) into into a State Flow Chart?
In a Stateflow chart, add an "Input from Simulink" called "data", define the size as [5,5]. Add an "Output to Simulink" called "...

8 years ago | 0

| accepted

Answered
extract numbers from cell array and calculate mean
index=cellfun(@isnumeric,Mix); Mix(~index)={0}; mean(cell2mat(Mix),2)

8 years ago | 1

| accepted

Answered
Difference Elapsed time program between two matlab versions ?!!
Sure, I am growing older, I am running slower, :). Seriously, if that is all the time it takes to run your program in the two...

8 years ago | 1

| accepted

Answered
How can I generate signal from microsoft excell dataset at Simulink ?
A few options depending on your situation: 1. Get the Simulink Tester toolbox. It can work with Excel spreadsheet directly. ...

8 years ago | 0

| accepted

Answered
Running script from command line changes working directory to script's directory
In this case, I would suggest adding your MATLAB script directory into MATLAB path.

8 years ago | 0

Answered
How to import files from an outside folder?
A = import_AB_function(fullfile(folder,files(i).name))

8 years ago | 0

| accepted

Answered
What is the best way to learn Matlab?
There used to be a command-line tutorial introducing the basic concept of matrix operation and MATLAB syntax. That is all it too...

8 years ago | 0

Answered
Copyfile: No matching files were found
use copyfile(source, destination)

8 years ago | 9

| accepted

Answered
How to measure runtime, if it is possible to close my laptop during the run?
cputime()? search "The cputime Function vs. tic/toc and timeit" on this page <https://www.mathworks.com/help/matlab/matlab...

8 years ago | 0

Answered
excel cells wider in matlab export
The direct answer is No. xlswrite() only writes the data. It can't format the Excel file. You can use actxserver('Excel.Appli...

8 years ago | 0

Answered
How to use syntax T = readtable(filename) for creating a table from a file?
try this filename='c:\MyDoc\MyFile.xlsx'; T=readtable(filename);

8 years ago | 2

| accepted

Answered
how can ı solve 'Not enough input arguments.' error?
If a function requires two input arguments but you provided only one, you'll get this error. Try: strcmp('a','b') strcmp...

8 years ago | 0

Answered
IF condition for infinity values
isnan() isfinite()

8 years ago | 1

| accepted

Answered
I'm new to Matlab Simulink. Tell me how the "Parameter Estimation" block was created in this model and how the data was loaded? Where do I begin?
It is a subsystem block. Select this block, right click, select "Properties ..", click the "Callbacks" tab, select "OpenFcn*"...

8 years ago | 0

Answered
Is there any way to convert variables from list to arrays?
a=1:3; b=2:4; c={'a','b'}; you could do d=eval(c{1}) or, you should do clear c; c.a=a; c.b=b; ...

8 years ago | 1

Answered
Wildcard or multiple conditions on switch/case?
Choice='chicken'; switch Choice case {'chicken','pork','beef'} disp('meat'); case {'bean','pea'} ...

8 years ago | 18

Answered
how can save a graph in matlab with 300 or above dpi resolutions?
See the doc for print(), e.g. in R2016b print(resolution,___) uses the specified resolution. Specify the resolution as a char...

8 years ago | 0

Answered
Error using mex: No supported compiler or SDK was found
VC 2017 certainly won't be recognized by MATLAB R2015a. But SDK 7.1 should be supported. Make sure you have NET Framework 4.0. ...

8 years ago | 2

Answered
I have a datetime '06-Sep-2012 09:29:00' or datenum "7.3387e+05", how do I write to a text file as follow "20120906 092900"
a=datetime('06-Sep-2012 09:29:00'); b=datestr(a,'YYYYMMDD HHmmss')

8 years ago | 0

Answered
Generating one random number from a given range of numbers.
R = randi([IMIN,IMAX],...) returns an array containing integer values drawn from the discrete uniform distribution on IMIN:...

8 years ago | 1

Answered
when save figure as .svg file, the greek letters/ glyph (for example μ and σ) would become path instead of text. any solution?
In Windows 10, MATLAB R2017a, the "μ" in output.svg file looks correct when opened with Chrome. %% h=figure; plot(ran...

8 years ago | 0

Load more