![photo](/responsive_image/150/150/0/0/0/cache/matlabcentral/profiles/5769629_1527617117231_DEF.jpg)
Giuseppe Inghilterra
Politecnico di Milano
Followers: 0 Following: 0
Statistiques
RANG
884
of 292 684
RÉPUTATION
80
CONTRIBUTIONS
0 Questions
30 Réponses
ACCEPTATION DE VOS RÉPONSES
0.00%
VOTES REÇUS
11
RANG
of 19 932
RÉPUTATION
N/A
CLASSEMENT MOYEN
0.00
CONTRIBUTIONS
0 Fichier
TÉLÉCHARGEMENTS
0
ALL TIME TÉLÉCHARGEMENTS
0
CONTRIBUTIONS
0 Publications
CONTRIBUTIONS
0 Public Chaîne
CLASSEMENT MOYEN
CONTRIBUTIONS
0 Point fort
NOMBRE MOYEN DE LIKES
Feeds
data replace with NaN
Hi, I would do in the following way: y(x>=2.519e6 & x<=2.52e6) = NaN; In this way I overwrite the current values of y vector ...
environ 3 ans il y a | 1
| A accepté
EPS export issue: blank figure
Hi, I usually export matlab figures in .svg format, then I modify them in inkscape and save it to .pdf. I add it in LaTex docum...
plus de 4 ans il y a | 0
How to set specific variables in fmincon to be integers only?
Hi, another solution could be adding non linear equality constraints: for example remainder of division between first variable ...
plus de 4 ans il y a | 0
How to modify data vector
Hi, you convert to string your time vector (num2str function) and then convert it to date (datetime function), specifying input...
plus de 4 ans il y a | 0
How to save each term from a sum
Hi, try to run this code. I add a plot in which I show how "pi1" converges toward to pi value. clear n = input('Number of ter...
plus de 4 ans il y a | 0
Print figure without its title
Hi, an easy and fast solution could be save first the figure and then add title, as following code: close all; clear all; cl...
plus de 4 ans il y a | 0
how to plot multiple graphs
Hi, you can plot all these figure by using a for loop cycle. Example: for ii = 1:180 figure plot(x,y) end In this...
plus de 4 ans il y a | 0
Protect the size of a preallocated matrix
Hi, in MATLAB numeric arrays are free to change size, i.e. if you add an element outside intial defined dimension, then array w...
plus de 4 ans il y a | 0
| A accepté
Find rows of cell array containing certain specific multiple cells?
Hi, try to run following code, variable 'r' returns you row that contains what are you looking for: [r c] = find(strcmp(ca,'g'...
plus de 4 ans il y a | 0
| A accepté
I want to double numbers that are less than the given parameter. What do I need to change
Your function will be: function dataSamples = AdjustMinValue(numberSamples, userSamples, minValue) % numberSamples: Number of ...
plus de 4 ans il y a | 0
Reading all text from specific cell from .csv file.
Hi, try to run following code, you should obtain what you have asked: close all clear all clc filename = 'dtc_table.csv';...
plus de 4 ans il y a | 0
| A accepté
How merge block works in simulink?
For merge block see reference: https://www.mathworks.com/help/simulink/slref/merge.html However, if you try to model as merge_b...
plus de 4 ans il y a | 1
Why is my scatter plot producing inconsistent results?
Hi, your code is correct. ev17 and sch17 have the same value (2631). Both are plotted with diamond marker, thus they are superi...
plus de 4 ans il y a | 1
Schröder number with formula
I show you how you could solve your problem. Try this code: prompt = 'n: '; n = input(prompt); % ask the user for a...
plus de 4 ans il y a | 0
write indexes in a plot
Hi, look this answer: https://www.mathworks.com/matlabcentral/answers/97277-how-can-i-apply-data-labels-to-each-point-in-a-scat...
plus de 4 ans il y a | 0
| A accepté
Random specified numbers.
Hi, you can use randsample matlab function. (Reference: https://www.mathworks.com/help/stats/randsample.html). y = randsample...
plus de 4 ans il y a | 0
Random variation in a signal in Simulink
Hi, if you can use stateflow in your simulink model, following chart could be a solution: As you can see you start from stat...
plus de 4 ans il y a | 0
| A accepté
How to make real and imaginary plot of the graph same color
Hi, a fast and easy solution could be generate a triplette of RGB values randomly at each iteration and you use it as color fo...
plus de 4 ans il y a | 1
| A accepté
How to simulate a random castle in a chessboard?
Hi, if you try to run this code: close all clear all clc n = 8; %chessboard size CB = zeros(n,n); %init ...
plus de 4 ans il y a | 0
| A accepté
How to plot fixed value for a number of ranges splited by a fixed step size in MATLAB?
Hi, you can obtain your plot by using 'bar' matlab function (reference: https://www.mathworks.com/help/matlab/ref/bar.html). F...
plus de 4 ans il y a | 0
| A accepté
Exact value in excel sheet of function
Hi, you can see on command window by enter following lines: format long y(783) In this way you can see on command wi...
plus de 4 ans il y a | 1
| A accepté
How to fix axes in dynamic plot
Hi, you can add in your code xlim and ylim functions close all x=@(t)(sin(4*t)).^2; y=@(t)cos(5*t); z=pi; figure(1) for...
plus de 4 ans il y a | 0
Specifying row and columns in writetable function
Hi, see https://www.mathworks.com/help/matlab/ref/writetable.html on how to use writetable function. writetable(T,'myData.xls'...
plus de 4 ans il y a | 1
Plot grided latitude and longitude as pixels on map
I obtain this result: by running the following code: load lati.mat load loni.mat [LONG, LAT] = meshgrid(loni,lati); Z =...
plus de 4 ans il y a | 3
| A accepté
Am I doing this right? (a Math formula to Matlab language)
Hi, A and B terms are wrong. What you wrote is the square of sum of differences. Instead formula is the sum of square of diffe...
plus de 4 ans il y a | 1
my plot is not sinusoidal wave
Hi, the argument of cosine "(m*pi.*x)/el" returns you always one. This happens because your cosine argument is expressed in t...
plus de 4 ans il y a | 1
Import variable names and vaues from a .txt file
Hi, you can try "eval" matlab function to solve your problem For example: T = readtable(filename,'Delimiter',' '); [r,c] =...
plus de 4 ans il y a | 0
How do I stop patch from making my squares into rectangles?
Hi, you can add to your code the following line: axis equal In this way you obtain the following result: You can see: h...
plus de 4 ans il y a | 0
| A accepté
creating a variable address
Hi, i recommend you to use "fullfile" matlab function. This function allows you to build addresses from parts. Thus, in your ...
plus de 4 ans il y a | 0
| A accepté
how to write a matrix to spesific excel row?
Hi, when you use xlswrite function, if you don't specify "sheet" as input argument, you must write the range in rectangular sha...
plus de 4 ans il y a | 0