Beantwortet
Programmatically changing the parameters of a LTI System Block in Simulink
The parameter names are "sys" and "IC". get_param('ES_Optimizer/LTI System','sys') get_param('ES_Optimizer/LTI System','...

mehr als 8 Jahre vor | 0

| akzeptiert

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

mehr als 8 Jahre vor | 2

| akzeptiert

Beantwortet
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,:)

mehr als 8 Jahre vor | 2

| akzeptiert

Beantwortet
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)

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

Beantwortet
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 "-'

mehr als 8 Jahre vor | 1

| akzeptiert

Beantwortet
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,...

mehr als 8 Jahre vor | 0

| akzeptiert

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

mehr als 8 Jahre vor | 0

| akzeptiert

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

mehr als 8 Jahre vor | 1

| akzeptiert

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

mehr als 8 Jahre vor | 0

| akzeptiert

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

mehr als 8 Jahre vor | 1

| akzeptiert

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

mehr als 8 Jahre vor | 1

| akzeptiert

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

mehr als 8 Jahre vor | 0

| akzeptiert

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

| akzeptiert

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 9

| akzeptiert

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 2

| akzeptiert

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 1

| akzeptiert

Beantwortet
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*"...

mehr als 8 Jahre vor | 0

Beantwortet
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; ...

mehr als 8 Jahre vor | 1

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

mehr als 8 Jahre vor | 18

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

mehr als 8 Jahre vor | 0

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

mehr als 8 Jahre vor | 2

Beantwortet
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

mehr als 8 Jahre vor | 6

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

mehr als 8 Jahre vor | 0

Beantwortet
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:...

mehr als 8 Jahre vor | 1

Mehr laden