Risposto
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

circa 8 anni fa | 1

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

circa 8 anni fa | 1

| accettato

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

circa 8 anni fa | 1

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

circa 8 anni fa | 1

| accettato

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

circa 8 anni fa | 1

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

circa 8 anni fa | 2

| accettato

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

circa 8 anni fa | 1

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

circa 8 anni fa | 2

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

circa 8 anni fa | 1

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

circa 8 anni fa | 1

| accettato

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

circa 8 anni fa | 1

Domanda


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

circa 8 anni fa | 1 risposta | 1

1

risposta

Domanda


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

circa 8 anni fa | 1 risposta | 1

1

risposta

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

circa 8 anni fa | 1

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

circa 8 anni fa | 1

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

circa 8 anni fa | 1

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

circa 8 anni fa | 2

| accettato

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

circa 8 anni fa | 1

Domanda


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

circa 8 anni fa | 1 risposta | 1

1

risposta

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

circa 8 anni fa | 1

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

circa 8 anni fa | 1

| accettato

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

circa 8 anni fa | 1

| accettato

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

circa 8 anni fa | 1

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

circa 8 anni fa | 1

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

circa 8 anni fa | 1

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

circa 8 anni fa | 1

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

oltre 8 anni fa | 2

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

oltre 8 anni fa | 1

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

oltre 8 anni fa | 1

| accettato

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

oltre 8 anni fa | 4

| accettato

Carica altro