Réponse apportée
How can I turn a vector output into 3 separate scalar outputs?
Try using this [a b c]=sort3([2 15 6]) You will get 3 separate answers

environ 8 ans il y a | 1

Réponse apportée
Plotting a 2-d graph
If you want to use 3 variables on 2D plot, then you can use contour or contourf or surf or surfc. clc clear lat=(1:10...

environ 8 ans il y a | 1

| A accepté

Réponse apportée
What's the difference between R^2 and r?
The value which you get for corrcoef (gives output a matrix and further extracting second column from first row) or from corr2 (...

environ 8 ans il y a | 1

Réponse apportée
Problem "Invalid first data argument" when plot a figure
hold on x=(1:127); col={'b','r','k','y'} data={vxo_cycle*0.1,gdp_cycle*0.01,pi_cycle,hoursworked_cycle} for ii=1:4...

environ 8 ans il y a | 1

| A accepté

Réponse apportée
creating Lagrange interpolation w.r.t. two arrays
time=[t1 t2 t3]; data=[y1 y2 y3]; tt=[tt1 tt2 tt3 tt4 tt5 tt6 tt7]; for i=1:length(tt) data(i)=((tt(i)-t2)*(tt(i)-...

environ 8 ans il y a | 1

Réponse apportée
Three dimensional plot using 4 variables
For the contour plot, you can use contour(lon,lat,salinity') If you want the filled contour plot, then you can use cont...

environ 8 ans il y a | 2

| A accepté

Réponse apportée
please help me to solve the issue:
You have used randsample(1:size(C,1),e) in between of the program. Just because of this, you are getting F of different...

environ 8 ans il y a | 1

Réponse apportée
Problem w/ saving different parts of a 3D matrix in separate matrices!
There are too many things which you have to check before executing the loop. indv_func(:,j,t) = func_status(:,j,1:time(j));...

environ 8 ans il y a | 2

Réponse apportée
Could anyone tell me how to execute the following code
You problem of _Error using randperm K must be less than or equal to N_ can be resolved by changing divisions = sort(randp...

environ 8 ans il y a | 1

Réponse apportée
How to find correlation coefficient between measured data and mathematically retrieved data without corr2.
First method: Use corrcoef to find the correlation coefficient which yields a 2*2 matrix. eg. A=corrcoef(randi(35,9,9),ran...

environ 8 ans il y a | 1

| A accepté

Réponse apportée
plot figure from excel files
Firstly, you have to load the data from your excel sheet(s) in matlab, then plot whatever you want. To load the data from excel...

environ 8 ans il y a | 1

Question


problem using xticks and xticklabels
Now, I have a plot whose x axis starts from 0 to 600 and tick labels are there in the interval of 100. Labels are there at the i...

environ 8 ans il y a | 1 réponse | 1

1

réponse

Question


Changing colors within a line a plot
I have the set of [x y] point, which I have to plot the line plot. I also have the weights of these pairs. I want to plot line...

environ 8 ans il y a | 1 réponse | 1

1

réponse

Réponse apportée
Interpolate for the remaining longitudes!
Suppose, you have stored all the missing longitudes in the variable _lon_ and the corresponding latitudes in the variable _lat_...

environ 8 ans il y a | 1

Réponse apportée
plotting the graph for (5*5) matrix
You can plot the contour map of 5*5 matrix using _contourf_ <https://in.mathworks.com/help/matlab/ref/contourf.html> Or you c...

environ 8 ans il y a | 1

Réponse apportée
please help me to solve this issue
Your matrices are in 3D. So if you want to add all along third dimension, so use sum(output_it,3) Suppose, your matri...

environ 8 ans il y a | 1

Réponse apportée
How to solve error for Index exceeds matrix dimensions
You have written this between the code which is creating error. k = [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21...

environ 8 ans il y a | 2

| A accepté

Réponse apportée
how to add n number of (3*3)matrixes
Suppose you have A,B,C,D,E....Z matrices of 3*3. And you have to add these all. There are different ways to do. I am t...

environ 8 ans il y a | 1

Question


Split vector into increasing and decreasing
How to split A vector as increasing and decreasing vectors. eg. A=[1 1 2 2 3 3 8 9 4 3 2 2 2 1 0] I want the out...

environ 8 ans il y a | 1 réponse | 1

1

réponse

Réponse apportée
Save in a variable Excel cells Matlab
filename = 'myExample.xlsx'; sheet = 1; xlRange = 'B2:C3'; subsetA = xlsread(filename,sheet,xlRange)

environ 8 ans il y a | 1

Réponse apportée
1/y on y-axis
You want to get the reciprocal of y. fplot(@(x) 1/(2367005001044503*x^2)/140737488355328,[0 67/1000],'b') You will get ...

environ 8 ans il y a | 1

| A accepté

Réponse apportée
figure to pdf but without the displaying it in the "figure-window"?
Use print or saveas function to save a plot/figure. To close your figure window automatically after saving the plot in pdf.jpeg...

environ 8 ans il y a | 1

| A accepté

Réponse apportée
Index exceeds matrix dimensions
There are few corrections which you have to do. 1. You have defined _fun_ in between of the function. So, there is no need to...

environ 8 ans il y a | 1

Réponse apportée
loop
Suppose, you are storing a result in A. So, you can use xlswrite('my_excel_sheet.xlsx',A,'sheet_name','A1')

environ 8 ans il y a | 1

Réponse apportée
How to make a figure fit a screen on a 2nd monitor?
You are so close to your answer. You a step ahead from your answer. figure('units','normalized','outerposition',[0 0 1 1])...

environ 8 ans il y a | 1

Réponse apportée
How to numerically differentiate one function with respect to another?
There might be some formula based on the theory. Please provide the formula also to help you in a better way. For the time bein...

environ 8 ans il y a | 1

Réponse apportée
View only MatLab files in the Current Folder Window
In the current folder window, you can group all available files (including folder, .mat, .m and all) by its type. You can do th...

environ 8 ans il y a | 2

Réponse apportée
How to write the given equation in matlab?
I have assumed the values of r_0, p_0 and k_0. This is the command, as per your attached picture. I am not able to understand yo...

environ 8 ans il y a | 1

Réponse apportée
Why is my For loop only using the last input number
Write the plot command inside the loop. figure(1); for n = 1:7 [Xo, Yo, Zo, Imag, theta, phi, omgX, omgY, o...

environ 8 ans il y a | 1

| A accepté

Réponse apportée
Spatial Correlation between two variables
For simplicity, I am taking A and B for which we want to find spatial correlation. lat have the dimension 240 and lon have t...

environ 8 ans il y a | 4

| A accepté

Charger plus