Respondida
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

más de 8 años hace | 1

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

más de 8 años hace | 1

| aceptada

Respondida
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 (...

más de 8 años hace | 1

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

más de 8 años hace | 1

| aceptada

Respondida
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)-...

más de 8 años hace | 1

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

más de 8 años hace | 2

| aceptada

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

más de 8 años hace | 1

Respondida
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));...

más de 8 años hace | 2

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

más de 8 años hace | 1

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

más de 8 años hace | 1

| aceptada

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

más de 8 años hace | 1

Pregunta


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

más de 8 años hace | 1 respuesta | 1

1

respuesta

Pregunta


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

más de 8 años hace | 1 respuesta | 1

1

respuesta

Respondida
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_...

más de 8 años hace | 1

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

más de 8 años hace | 1

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

más de 8 años hace | 1

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

más de 8 años hace | 2

| aceptada

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

más de 8 años hace | 1

Pregunta


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

más de 8 años hace | 1 respuesta | 1

1

respuesta

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

más de 8 años hace | 1

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

más de 8 años hace | 1

| aceptada

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

más de 8 años hace | 1

| aceptada

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

más de 8 años hace | 1

Respondida
loop
Suppose, you are storing a result in A. So, you can use xlswrite('my_excel_sheet.xlsx',A,'sheet_name','A1')

más de 8 años hace | 1

Respondida
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])...

más de 8 años hace | 1

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

más de 8 años hace | 1

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

más de 8 años hace | 2

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

más de 8 años hace | 1

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

más de 8 años hace | 1

| aceptada

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

más de 8 años hace | 4

| aceptada

Cargar más