Réponse apportée
Recovering text between parentheses using regexp
exp = '[^()]*'; should be it.

environ 8 ans il y a | 2

| A accepté

Réponse apportée
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,:)

environ 8 ans il y a | 2

| A accepté

Réponse apportée
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)

plus de 8 ans il y a | 0

Réponse apportée
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...

plus de 8 ans il y a | 0

Réponse apportée
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 "-'

plus de 8 ans il y a | 1

| A accepté

Réponse apportée
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,...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
How do I acess elements of a matrix with round indexes without loops?
A(2:2:end)=A(2:2:end)*2

plus de 8 ans il y a | 1

| A accepté

Réponse apportée
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 "...

plus de 8 ans il y a | 0

| A accepté

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

plus de 8 ans il y a | 1

| A accepté

Réponse apportée
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...

plus de 8 ans il y a | 1

| A accepté

Réponse apportée
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. ...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
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.

plus de 8 ans il y a | 0

Réponse apportée
How to import files from an outside folder?
A = import_AB_function(fullfile(folder,files(i).name))

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
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...

plus de 8 ans il y a | 0

Réponse apportée
Copyfile: No matching files were found
use copyfile(source, destination)

plus de 8 ans il y a | 9

| A accepté

Réponse apportée
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...

plus de 8 ans il y a | 0

Réponse apportée
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...

plus de 8 ans il y a | 0

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

plus de 8 ans il y a | 2

| A accepté

Réponse apportée
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...

plus de 8 ans il y a | 0

Réponse apportée
IF condition for infinity values
isnan() isfinite()

plus de 8 ans il y a | 1

| A accepté

Réponse apportée
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*"...

plus de 8 ans il y a | 0

Réponse apportée
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; ...

plus de 8 ans il y a | 1

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

plus de 8 ans il y a | 18

Réponse apportée
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...

plus de 8 ans il y a | 0

Réponse apportée
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. ...

plus de 8 ans il y a | 2

Réponse apportée
How to replace the diagonal entries of a square matrix with entries from a vectore of equal length?
a=rand(5); a(boolean(eye(5)))=1:5

plus de 8 ans il y a | 6

Réponse apportée
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')

plus de 8 ans il y a | 0

Réponse apportée
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:...

plus de 8 ans il y a | 1

Réponse apportée
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...

plus de 8 ans il y a | 0

Charger plus