Respondida
how to compute separate line 2 dimensional points
Once you have the plot, go to _tools_ -> _Basic fitting_ select the data (1 or -1 in your case), linear and click in the bott...

más de 11 años hace | 0

Respondida
How to rename variables in a loop?
you are not using _eval_ in the right way. You should do: x=3; eval('a = x') a = 3 Adapt the code t...

más de 11 años hace | 0

Respondida
How do i convert the following into exe?
Matlab compiler does not support symbolic toolbox You can read this thread too: <http://www.mathworks.com/matlabcentral/an...

más de 11 años hace | 0

| aceptada

Respondida
EXTRACT NUMBER FROM A COMBINED STRING AND NUMBERS
use _str2double_ to get it in double format: output = str2double(String(regexp(String , '[0-9]'))) output = ...

más de 11 años hace | 0

Respondida
how to load my file in to matlab?
Just write the name of the *.m file containing the data/script you want to load. Write it where you want it to run.

más de 11 años hace | 0

Respondida
How to store data while simulating a model?
You need to add two blocks to your model. 1) to save data, ad "To Workspace" block. This will send and save data into the wor...

más de 11 años hace | 0

Respondida
how to show my output data in map.
You will have to present your data by year: XX YY]= meshgrid(X1,Y1); z=ltm(:,:,1); surf(XX,YY,z') xlabel('XX') ...

más de 11 años hace | 0

Respondida
how to select certain elements from a matrix?
B=[90,0,40,0; 0,0,10,60; 55,15,0,10; 0,15,5,0]; [col row]=find(B==0); A= [row col] % coordinate...

más de 11 años hace | 0

| aceptada

Respondida
trouble with complicated loop
% You are playing with two differet indeces: _i_ and _M_. % You have to fix _i_ and then perform the summation: x=ra...

más de 11 años hace | 0

| aceptada

Respondida
how to show my output data in map.
you could take a look at the demos within Matlab documentation. You will find many working examples on data representation, like...

más de 11 años hace | 0

Respondida
how to make sum of (for loop)
the _for loop_: a = 3; % or whatever value you have in mind b = 2; % or whatever value you have in mind n = 10; % or ...

más de 11 años hace | 0

Respondida
Extract data from excel using heading
[data headings] = xlsread('your_excel.xls'); headings = headings(1,:);% first row of headings, in case you have some others...

más de 11 años hace | 0

| aceptada

Respondida
Compare two columns in a matrix, perform if statement.
Your sample data is not very useful, but I think you are trying to do something like this: %sample data A=[-0.758061618...

más de 11 años hace | 0

| aceptada

Respondida
Need help to form equations
a = rand(1,4); % your a matrix syms v1 v2 v3 v4 S = solve( a(1)*v1^2-a(2)*v2-a(3)*v3^2-a(4)*v4==0,... a(3)*v3^2-a(4)...

más de 11 años hace | 0

| aceptada

Respondida
How to combine 2 for loops
You were not very clear in your explanation, but I think you want this: id = [ 1 3; 2 6; 3 2; 4 5; 5 1; 6 4; 7 7]; c...

más de 11 años hace | 1

| aceptada

Respondida
button in a figure
try this: S.f = figure; S.h=plot(rand(10,1)); % creates a figure and plot something on it % create a pushbtton ( adapt i...

más de 11 años hace | 1

Respondida
how to correctly prompt user to enter only 1 real number,numeric value,that is within range...?
A=input('please enter only 1 number and make sure its in range: ','s'); while (isnan(str2double(A)) || str2double(A)<=4 ||...

más de 11 años hace | 1

| aceptada

Respondida
Reduce the size of a vector
vect_45 = rand(1,45000); % your 1x45000 array vect_36 = vect_45(:,1:36000); vect_27 = rand(1,27000); % your 1x27000...

más de 11 años hace | 0

Respondida
Waterfall plot of a time series data
You can use _ncread_ to access your data within the netcdf file. ( From MATLAB documentation ) ncdisp('example.nc','peaks'...

más de 11 años hace | 0

Respondida
how to convert the solid line into dashed line in the images during overlay of images
h = plot(rand(10,1)); % this creates a handle to the figure set(h,'LineStyle','--') % this convert the solid line into ...

más de 11 años hace | 0

| aceptada

Respondida
Tic toc command giving erroneous result
The time taken to run both scripts are insignificantly different. There are only two lines of code of difference between them: ...

más de 11 años hace | 0

Respondida
Curve fitting for power equation
Use the curve fitting tool cftool % this will open the curve fitting tool interface From the user interface, select you ...

más de 11 años hace | 0

Respondida
when two individual number remain in one cell such as a cell contain [300;350]. then how can i extact a single value from the cell?
To extract elements form a cell: p{1}(1) % this will return first element of first cell p{3}(2) % this will return secon...

más de 11 años hace | 0

| aceptada

Respondida
how to create world file
If you mean _Word_ instead of _World_: Publish the file in Microsoft Word format. publish('Your_file.m','doc');

más de 11 años hace | 0

Respondida
How to print the first 100 primes including 1 as a vector
p = [1 primes(100)] p = Columns 1 through 19 1 2 3 5 7 11 13 17 19 23 ...

más de 11 años hace | 0

| aceptada

Respondida
How do I measure mean of every 10 data of a vector size 1x1500?
A = rand(1,1500); % your data M = zeros(1,150); % MEAN MATRIX for k=1:150 M(k) = mean(A(((k-1)*10+k):10*k)); e...

más de 11 años hace | 0

| aceptada

Respondida
How to intersect these lines?
I give you the code for two lines, you extend it to three (do it by pairs if true % code end): %For...

más de 11 años hace | 0

Respondida
How can we Plot a line passing through two points?
If you want a line connecting A and B: A = [2 3]; B = [4 5]; plot(A,B,'*') axis([0 10 0 10]) hold on line(...

más de 11 años hace | 3

| aceptada

Respondida
why can't i plot this function? :(
Try it this way: x = -5:.1:5; y = -5:.1:5; [x1 x2] = meshgrid(x,y); G2 = -(1+cos(12.*sqrt(x1.^2+x2.^2)))./(0.5.*...

más de 11 años hace | 0

| aceptada

Respondida
is it posible to create matrixplot for several data types?
I think -plotmatrix-does not have the option of holding the plot to add extra data. You can use _plot_ and _hold on_ instead: ...

más de 11 años hace | 0

Cargar más