Answered
Rotate 3D surface matrices
You can manually change data. Just use rotation matrix a = 15; % angle rotation R = [cosd(a) sind(a);-sind(a) cosd(a)]; V...

6 years ago | 1

| accepted

Answered
how to write code exchange the y value in the ode15s?
Here is the answer

6 years ago | 0

Answered
saving points in a sequence to form a contour
I made some research and succeeded. See attached script

6 years ago | 0

| accepted

Answered
ploting data excel to matlab
I corrected your script. Try now [filename,path] = uigetfile('.xlsx') dataExcel = xlsread(fullfile(path,filename)) penghasi...

6 years ago | 0

| accepted

Answered
How do I plot animation of temperature data for a 3D object with time?
Just use pause and for loop maxt = max(t); mint = min(t); N = 100; cmap = jet(N); % generate N colors for tem...

6 years ago | 0

Answered
CAN SOMEONE HELP ME WITH THE PLOT?
My solution x = 1 : 12; y = x; ind = [1 2 4 6 7 8 11]; plot(x,y,'.r') hold on for i = 1:length(ind)-1 x1 = x(ind(i));...

6 years ago | 0

Answered
Filling areas between curves
Example clc,clear x1 = linspace(0,1.5); y1 = sin(x1); x2 = linspace(0,2); y2 = cos(x1); cla [xc,yc] = polyxpoly(x1,y1,x...

6 years ago | 0

Answered
For loop over different dimensions
What about filling with NaN? y = portfolios(:,i); % Between 60 and 180 observation if length(portfolios(:,i)) < 180 y...

6 years ago | 0

| accepted

Answered
Draw this type of figure from given data.the data contains lat long disp(north,east,down) and other quantities but i need figure only for the displacement simillar to the attached figure
Here is what i tried. I didn't use disp_down, only east and north A = xlsread('coseis.xlsx'); x = A(:,1); y = A(:,2); u = ...

6 years ago | 0

| accepted

Answered
For Loop nested within a while loop, run until condition is met
This lines actually means: "loop if condition is met" while headold-head<cc % solving for head until convergence criteria is me...

6 years ago | 0

| accepted

Answered
how can i make matlab select a value for a vector variable from a set of data
Use xlsread MCRdata = xlsread('data.xls'); % read data from excel file MCR0 = MCRdata(5); % assign 5th v...

6 years ago | 0

| accepted

Answered
Changing Name Location of Points
You can set backgroundcolor to your labels x = linspace(0,10); y = sin(x); plot(x,y) text(0.8,0.8,'he','backgroundcolor','r'...

6 years ago | 0

| accepted

Answered
Removing the origin from the 3D meshgrid?
Make selected values even (2 4 6 .. 98 100)

6 years ago | 1

| accepted

Answered
how can i find the distance from the peak of one wave to another wave in a image?
I suggest next algorithm imcrop region of interest (since it's always at the same position imbinarize image maybe clear a bit...

6 years ago | 1

| accepted

Answered
How can I centre points of interest in an image before it's cropped and saved?
You previous code was ok i think. Just made some changes [ii,jj] = find(I5); % calculate boundaries i1 = min(ii); %...

6 years ago | 0

| accepted

Answered
solving a system of equations where some variables are linked to a function
I tried fsolve %%variables that are known. m_3=0.004 ; h_3=1530; y_3=0.62; To=25+273; P_c=1.5 ; UA=0.5; hfg2=2256; ...

6 years ago | 0

| accepted

Answered
2D Temperature Distribution
I made some changes in your code X = 10; Y = 10; theta1 = zeros(X,Y); for n =1:100 theta1 = theta1 + (2/pi)*(((-1)^(n+1...

6 years ago | 0

| accepted

Answered
Max of vector in higher dimensional array subject to constraints
Use max() B = max(A,[],3);

6 years ago | 0

Answered
Plot straight lines between the data points in the same colour as the data points with lots of NaN values
Remove NaN? ind = ~isnan(y); plot(x(ind),y(ind),'or') Remember about accepting the answer if it helps

6 years ago | 0

| accepted

Answered
How do you use ./ operator on array of custom class

6 years ago | 0

| accepted

Answered
Transform RGB image to grayscale but keep format as RBG
You can use repmat or cat to create 3D matrix I1 = rgb2gray(I); I2 = cat(3,I1,I1,I1); % gray image as 3D matrix %I2 = r...

6 years ago | 0

Answered
Excel data set to vectors
Use quiver function u1 = diff(x1); v1 = diff(y1); plot(x,y,'.r') hold on quiver(x1(1:end-1),y1(1:end-1),u1,v1) hold off

6 years ago | 0

| accepted

Answered
How to rotate a rectangle
If you open (Ctrl+D) rotate function you will find these lines at the end: if strcmp(t,'surface') || strcmp(t,'line') se...

6 years ago | 0

Answered
How to solve a differential equation system with ode15s
I made some correcitons. Try now

6 years ago | 0

| accepted

Answered
Extract sub-matrix compute correlation coefficient 2D case iteratively
Sometimes i+1 > numcols. What will happen then? (RED) Left side has one number, right one - 4. (GREEN)

6 years ago | 1

| accepted

Answered
How can I solve a system of differential equations including a bounded proportional controller?
Interpolate TL to choose correct value Don't use y(4) for Ct function dy=freylaw(t,y,time_min,TL) L=10; ...

6 years ago | 0

| accepted

Answered
Solve equations in a loop with fsolve
This is the correct form tau = 0.1 f4 = [3; 2; 6; 8] f8 = [2; 6; 7; 3] eq = @(s,f4,f8) s*tau-(0.1.*s^2+3.54.*s-9.53).*f4.^2...

6 years ago | 0

Answered
How to adjust colors of animated plot3 over time
Try this n = 100; colors = jet(100); x = linspace(0,10,n); y = sin(x); cla xlim([min(x) max(x)]) ylim([min(y) max(y)]) ...

6 years ago | 0

Answered
2-D conduction in a aluminum plate
Your equation: Can be re-written as (difference scheme): You should express while 1 % loop until toler...

6 years ago | 1

| accepted

Answered
Plotting a Graph with Shapes and Colours
An example h1 = plot(1,1,'.r'); % red point hold on h2 = plot(2,2,'.b'); % blue point hold off legend...

6 years ago | 1

| accepted

Load more