Réponse apportée
How can i plot a colormap (2d)
You can use pcolor

environ 12 ans il y a | 0

Réponse apportée
add a column between tow columns
Given the array A and the column vector x, let n be the column after which you want to add x into A: ncol = size(A,2); c...

environ 12 ans il y a | 2

| A accepté

Réponse apportée
Problem getting polygons for NY state?
The second part of the code didn't work for me, so I replaced it with this and I get a nice contour: k = struct2cell(states...

environ 12 ans il y a | 1

| A accepté

Réponse apportée
Changing save name for text file
Use: S=strcat(cd,'\Results\',[answer,'.txt']);

environ 12 ans il y a | 0

Réponse apportée
how to store value from loop
Define a cell array before the loop: x_error = cell(50,50); % Adjust num elements according to your loops and then do: ...

environ 12 ans il y a | 0

Réponse apportée
Not all Subplots are plotting
you have for j = 1:a with a = 0.1, i.e. it never enters the loop

environ 12 ans il y a | 0

Réponse apportée
Integration of a curve
You can use trapz

environ 12 ans il y a | 0

Réponse apportée
Contouring a mesh and assigning magnitude arrows in Matlab
use quiver(x(1:dx:end),y(1:dy:end),u(1:dy:end,1:dx:end),v(1:dy:end,1:dx:end)) where dx and dy are how many elements to ...

environ 12 ans il y a | 3

| A accepté

Réponse apportée
determine loop which include cellarrays
z=[1 2 3;4 5 6;7 8 9]; w = cell(3,1); n = cell(3,1); for i=1:3 w{i}=z(:,i); n{i}=w{i}(1,:); end

environ 12 ans il y a | 0

| A accepté

Réponse apportée
How data or numbers from excel tranfer to matlab workspace and communicate with the matlab GUI?
Don't do it that way. Read the excel file in the opening function of the GUI or where appropriate (e.g., when you press on a pus...

environ 12 ans il y a | 0

Réponse apportée
add a number to the legend
legend(['Sandwich panel(',num2str(put_number_here),')']) or you could use sprintf.

environ 12 ans il y a | 2

Réponse apportée
Error: In an assignment A(I) = B, the number of elements in B and I must be the same
If you do not need to store Num0 and have it after the for loop ends, you could just do Num0 = find.... especially beca...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
for look and store in a 2x2 matrix
for i = 122:305 assignin('base',['A',num2str(i)],DamithCount(S1(i,:),S1(i+1,:))); end Look up assignin to...

environ 12 ans il y a | 0

Réponse apportée
how to display string's edit box and string's popup when i go back from GUI2 to GUI1
You can write a function that sets the values in GUI1 when it is called from GUI2, i.e. something that does: set(handles.my...

environ 12 ans il y a | 0

Réponse apportée
help error: Reference to a cleared variable data.
remove clear all otherwise the input parameters get cleared before doing any calculations.

environ 12 ans il y a | 7

Réponse apportée
Help with exponential returning zeroes
B = exp(A)

environ 12 ans il y a | 0

| A accepté

Réponse apportée
Change the axis tick
set(gca,'xtick',1:1:10) replace 10 with your larger value

environ 12 ans il y a | 1

| A accepté

Réponse apportée
How can I use matlab to write data from a textfile and into an Excel sheet?
Once you have the data in matlab, use xlswrite. If you have 3 cols and n rows, where n can change: xlswrite('filename.xlsx'...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
Identidying next "n" elements of an array
To find just the first element that meets your condition, you can do: Inds = find(h<.90 & h>0.89,1); then: h(Inds+1...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
ODE45 how do I interpret this code...
When you call an ode solver, the values of y passed to your function Y change in time and depend on numerical method, in this ca...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
trying to create a legend that explains scatter plot marker type
You can try changing the order in which you plot data as: hold on h11 = scatter(MOCmaxCumEmFAST, minMOCFAST,size...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
loading items from listbox1 to listbox2
Add this: temp = get(handles.listbox2,'String'); temp{end+1} = filename; set(handles.listbox2,'String',temp)

environ 12 ans il y a | 0

| A accepté

Réponse apportée
link between edit text 1 and 2 when puch button has click
in the edit1 callback save the variable inputted by the user in a variable: handles.myvar = get(handles.edit1,'string'); ...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
how to stop from running a program whenever any of the element become zero or gets negative?
If you want to exit the loop, you can do: if(ismember(0,B)) break end If there is code after the loop, that part...

environ 12 ans il y a | 1

| A accepté

Réponse apportée
How do I extract a row of data from a cell array?
If you know which row you want to extract, you can do: b = a(row,:);

environ 12 ans il y a | 0

Réponse apportée
format the y tick labels
If you want to change the format of the y-axis: y = get(gca,'ytick'); yy = cell(numel(y),1); for i = 1:numel(y) ...

environ 12 ans il y a | 0

| A accepté

Réponse apportée
remove values of a matrix from another
If A and B are 1D arrays: for i = 1:numel(B) A(A==B(i)) = []; end

environ 12 ans il y a | 0

Réponse apportée
Search excel file for specific data and then copy adjacent columns in that range
I would read in the xls file with "xlsread" (the whole set of data). Then search the first column of the imported data with the ...

environ 12 ans il y a | 0

Réponse apportée
I need help with GUI
Define a variable that counts how many time the pushbutton has been pressed and set it to zero in the OpeningFcn as: handle...

environ 12 ans il y a | 1

| A accepté

Réponse apportée
Read excel data but keep formatting? Is this possible?
Use this form of xlsread, you'll find your variable into txt or raw: [num,txt,raw] = xlsread(___) From the help: [num,...

environ 12 ans il y a | 0

Charger plus