Réponse apportée
Simpson's 3/8 Rule
The problem is in the last LOOP, you set at the last iteration: ed = i + 2; When |i = 5, ed = 7| but |x| has only 6 ele...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
basic code question
If same size: x1(4:end-2) = x2(4:end-2); Otherwise: [x1(1:3); x2(4:end-2); x1(end-2:end)]

presque 14 ans il y a | 1

Réponse apportée
XLSWRITE
name = inputdlg('Name excel file as: ','Name excel',1);

presque 14 ans il y a | 0

| A accepté

Réponse apportée
Summing common elements of a matrix together
accumarray(A.',B.')

presque 14 ans il y a | 3

| A accepté

Réponse apportée
Guide: alphabet and symbols
Try this GUI function myGUI % Create figure S.fh = figure('units','pixels',... 'position',[500...

presque 14 ans il y a | 1

| A accepté

Réponse apportée
right y-axis
Does this help? set(gca,'box','on')

presque 14 ans il y a | 0

Réponse apportée
using datenum over several years
InDate = '2011-01-01 00:00'; FiDate = '2021-01-31 23:57'; % Create hourly spaced datetimes v = datenum(InDate):1/...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
add labels to columns
If you have the Statistic toolbox you can accomplish this with the <http://www.mathworks.co.uk/help/toolbox/stats/dataset.html |...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
Regress - are the regression coefficient standardized?
No, <http://www.mathworks.co.uk/help/toolbox/stats/regress.html |regress|> doesn't normalize automatically the regression coeffi...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
Can I make a scatterplot with custom marker symbols?
To show a practical example using Thomas' link in the comments: % Sample scattergroup load discrim h = gscatter(ratin...

presque 14 ans il y a | 2

Réponse apportée
Is there a way to have load command return data in format other than struct?
abc = fints; def = fints; save mymat clear load('mymat','abc') As opposed to load mymat which poofs al...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
Reading every 10th Trial Error
You initialize |i = 0|. MATLAB convention for positions is to start from 1, i.e. there's no position 0 in any array. Specif...

presque 14 ans il y a | 0

Réponse apportée
MATLAB Answer format
Is |W| a symbolic variable?

presque 14 ans il y a | 0

| A accepté

Réponse apportée
Is there a way to save a variable created in a function to the workspace?
the syntax of a function could be summarized as: [output1, output2, ...] = function(input1, input2, ...) Say, yuor varia...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
How to use any2csv - returning "??? Undefined function..."
You need to add the path where you placed |any2csv.m| addpath 'c:\something\...' Or simply change current folder ...

presque 14 ans il y a | 0

Réponse apportée
Portoflio Optimization
I am afraid you can't easily implement it with the existing tools. There are some papers out there (googling _portfolio optim...

presque 14 ans il y a | 0

A résolu


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

presque 14 ans il y a

A résolu


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

presque 14 ans il y a

A résolu


radius of a spherical planet
you just measured its surface area, that is the input.

presque 14 ans il y a

Réponse apportée
Regstats : Multiple regression/comparing regression slopes
Your data (in copy-pastable form): X = [1;2;3;1;2;3;1;2;3]; Z12 = [0;0;0;1;1;1;0;0;0]; Z20 = [0;0;0;0;0;0;1;1;1]; ...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
How can I show a time/date stamp in the prompt?
http://undocumentedmatlab.com/blog/setprompt-setting-matlab-desktop-prompt/ Has link to FEX submission. *EDIT* setPro...

presque 14 ans il y a | 1

| A accepté

A résolu


Back to basics 1 - Saving
Covering some basic topics I haven't seen elsewhere on Cody. Given an input variable 'x', save it to disk in a file named 'co...

presque 14 ans il y a

A résolu


Back to basics 6 - Column Vector
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector, output true or false whether it is a colu...

presque 14 ans il y a

Réponse apportée
combine two set of data
thk = [R1; R2]; thk = thk(:).';

presque 14 ans il y a | 1

Réponse apportée
How to reverse a matrix dimension without affecting the other 2 (for 3 or more dimension matrixes)?
A = rand(238,132,35); A = A(:,:,35:-1:1); Or use <http://www.mathworks.co.uk/help/techdoc/ref/flipdim.html |flipdim|> (w...

presque 14 ans il y a | 4

| A accepté

Réponse apportée
Why should mvnpdf function be too slow
It's is not a _builtin_ function since it's not compiled but written with MATLAB code. Type in the command window to see how ...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
Covariance
You should read the documentation thoroughly: cov(A,1) is the *population* covariance (divides by |N|), while cov(A...

presque 14 ans il y a | 3

Réponse apportée
Change Color Multiple Times
It's not possible within MATLAB editor (to my knowledge) and green for comments is some sort of convention among programming lan...

presque 14 ans il y a | 0

| A accepté

Réponse apportée
Function to format number as currency?
Or using java: % Formatting according to locale j = java.text.NumberFormat.getCurrencyInstance(); j.format(1000.3243)...

presque 14 ans il y a | 7

| A accepté

Réponse apportée
How can I format a percent using 2 digits after the decimal
<http://www.mathworks.co.uk/help/techdoc/ref/sprintf.html |sprintf|> Example: x = 0.78765645; % almost 78.8% sprintf(...

presque 14 ans il y a | 2

Charger plus