Resuelto


Draw a x-by-x matrix 'Denmark flag'(Euro(2020)
Draw a x-by-x matrix 'Denmark flag' using '4' and '1'.(x is odd and bigger than 4) Number 4: Caption S.Kjær and number 1: K.S...

alrededor de 5 años hace

Resuelto


Reindex a vector
You are given two vectors of equal length. Vector N has numeric values (no Inf or NaN) while vector IDX has integers. Place th...

alrededor de 5 años hace

Resuelto


intersection of matrices
Given two matrices filled with ones and zeros, determine if they share a common row, column entry. These matrices are of identi...

alrededor de 5 años hace

Respondida
Adding Legend to Bar Graph
If you are concerned of coloring all bars specifically, then you need to use this code: figure() Labelit = {}; CL = [1 0 0; 0...

alrededor de 5 años hace | 0

Resuelto


Gallery function, learning
write a Function, edit something or Add something that give us like the following for random n: n=2 ans= [ 0 1 ...

alrededor de 5 años hace

Resuelto


Numbers spiral diagonals (Part 1)
Inspired by Project Euler n°28 et 58. A n x n spiral matrix is obtained by starting with the number 1 and moving to the right...

alrededor de 5 años hace

Resuelto


Divisors for big integer
Inspired by Problem 1025 and Project Euler 12. Given n, return the number y of integers that divide N. For example, with ...

alrededor de 5 años hace

Resuelto


Sum of big primes without primes
Inspired by Project Euler n°10 (I am quite obviously a fan). With problem n°250 by Doug, you can find some global methods to ...

alrededor de 5 años hace

Respondida
Fit an exponential curve
1st of all, your data's good fit is not 6.5*exp(a*x) that is why cftool is giving you the best fit that differs from your expect...

alrededor de 5 años hace | 0

Respondida
How can I find a character in a string?
Hi, Here is one of the many possible solutions to your exercise: clearvars fid = fopen('TEXT__R.txt', 'r'); % Your text f...

alrededor de 5 años hace | 0

Respondida
How to do a boxcar smoothing in mathlab ?
You can easily employ the following data filtering fcns: doc smooth doc filter doc conv https://www.mathworks.com/help/curve...

alrededor de 5 años hace | 0

Respondida
Migrating 2015b code to 2018b
In fact, in general all M-files (Simulink .slx and .mdl files) are forward compatible. However, there a few fcn/command syntaxes...

alrededor de 5 años hace | 0

Respondida
Delete first row matrix and records new value
Have you read this documentation for DAQ tools and fcns of MATLAB: https://www.mathworks.com/products/data-acquisition.html ...

alrededor de 5 años hace | 0

Respondida
How to conditionally format a variable with fprintf
Hi, Here is an easy solution with if cond operator: ... fprintf(fid, '%s\n', T_names{:}); for ii=1:numel(y) if y{ii}~=0 ...

alrededor de 5 años hace | 0

Respondida
I don't understand how to use the sgolay function for signal edges
Start your code with: clearvars Then it should work

alrededor de 5 años hace | 0

Respondida
Adding Legend to Bar Graph
Hi, here is an easy solution to your exercise: Labelit={}; LEG = {"Jump", 'Run', 'Squat', 'Cycle', 'Other'}; for ii=1:5 b...

alrededor de 5 años hace | 0

Respondida
Experts of MATLAB, how did you learn? Any advice for beginner/intermediate users?
Really great points on practical and theoretical aspects how to study and master programming in MATLAB environment. My learnig e...

alrededor de 5 años hace | 0

Respondida
How to get the normalized data from the histogram
See this doc (check for normalization under property of histogram): https://www.mathworks.com/help/matlab/ref/matlab.graphics.ch...

alrededor de 5 años hace | 0

Respondida
Overlapping graphs in figure
Here is a bit edited and corrected code: figure() for i=1:length(nodos)-1 plot([nodos(i):0.01:nodos(i+1)],polyval([Mx(:,:,i...

alrededor de 5 años hace | 0

| aceptada

Respondida
Sketch the graph using matlab
f=@(x, y)(x.*y.*sin(x-y)./(1+x.^2+y.^2)); syms x y dFxy = diff(f,x)+diff(f, y); fimplicit3(f); hold on; fimplicit(dFxy, 'k', ...

alrededor de 5 años hace | 0

Respondida
Saving a Datasource programmatically
The last line in your posted code: saveAsJDBCDataSource() is not MATLAB's builtin fcn unless you have your own or 3rd party fcn ...

alrededor de 5 años hace | 0

Respondida
why matlab take a lot of time in the symbolic calculation
The problem with integral2 calculation part not with vpasolve(). You need to check the limit values for xmin, xmax, ymin, ymax i...

alrededor de 5 años hace | 0

| aceptada

Respondida
Regression plot help for a range of data
No need to employ meshgrid() for calculations instead, use color ":" operator that performs vectorized calcs. L=...; u=......

alrededor de 5 años hace | 0

| aceptada

Respondida
Logical indexing in cell array
Now, what michio suggested works perfectly ok: b = {'1' '2' '3' '4' '5' '6'}; b(cellfun(@(x) strcmp(x,'3'), b))={'Found 3'} S...

alrededor de 5 años hace | 0

Respondida
Vectors must be the same length.
A small err in t's size: ... t = t(1:end-1); % 1 last value has to be removed. ...

alrededor de 5 años hace | 0

Respondida
Sketch the graph using matlab
Start with fimplicit(@(x, y)...)

alrededor de 5 años hace | 0

Respondida
I have a problem saving data
Or save in a different directory, e.g.: save('C:\Users\..\realizacionU12A') Change your current directory (cd ) and then save...

alrededor de 5 años hace | 0

| aceptada

Respondida
How to use if statement for than one variables?
Note that for loop and "if" based calcs are very slow and inefficient. Anyhow if indeed you wish to fix your code, then check ...

alrededor de 5 años hace | 0

| aceptada

Respondida
How to use if statement for than one variables?
There are several errs in your loop code that is not advised. Just because it is slow and inefficient. Here is an easy sol isnt...

alrededor de 5 años hace | 0

Respondida
Sum of a series containing table column data
What is the value of k? Just presuming k is taken from the number of elements in T, the calc can be done, e.g: k=0:numel(T)-1; ...

alrededor de 5 años hace | 0

Cargar más