Answered
How to graph 3 cylinders together.
Youmay modify the belo code and achieve it. Radius = 2. ; % Radius of the cylindrical theta = 360. ; % A...

12 giorni ago | 0

Answered
not able to plot
You need to save like shown bel and then plot: clc %% DESIGN ASSIGNMENT 1 %% %%-----------given----------%% Alt = 35000...

12 giorni ago | 0

Answered
syms x >> int(OHF(x,0,0,0),x,0,2) getting error msg " Undefined function 'OHF' for input arguments of type 'sym'".
x = OHF(rand,rand,rand) function out =OHF(b,mu,eta) syms x out=x^(mu-1)*(x+b+sqrt(x^(2)+2*b*x))^(-eta); end OR x = OHF(r...

12 giorni ago | 0

Answered
change legend name of ROC
plotroc(Ts,Y) hLegend = findobj(gcf, 'Type', 'Legend'); %get text hLegend.String % Change hLegend.String {'One' 'Two' 'Thr...

13 giorni ago | 1

| accepted

Answered
I want to change the size of a patch of .mat files from 40x40x40 to 64x64x64
Read about imresize3. I1 = imresize3(I,[64 64 64]) ; % I is your 40x40x40 image

13 giorni ago | 0

Answered
Plotting voltage vectors to head to tail
Vs = rand(1,2) ; Irc = rand(1,2) ; Vrrc = rand(1,2) ; Vcrc = rand(1,2) ; A = [Vs;Irc;Vrrc;Vcrc]; % GEt coordinates P ...

13 giorni ago | 0

Answered
Avoiding (X,Y)=(0,0) from loop
M=64; r = linspace(10^-3,1,M); theta = linspace(0,2*pi,M); [R, THETA] = meshgrid(r,theta); X = R....

13 giorni ago | 0

Answered
How to georeference in MATLAB?
file = 'truemap_automatedEditedz.tif' ; [A,R] = readgeoraster(file) ; image([-180 180], [90 -90],A)

13 giorni ago | 1

| accepted

Answered
How to add the the "change in" symbol (i.e the small tringle) on y label
Read about plot. The marker '^' goves you upper triangle and the marker 'v' gives you lower triangle.

17 giorni ago | 0

Answered
How to plot streamlines using Streamslice?
[X,Y] = meshgrid(-5:0.1:5,-5:0.1:5) ; u = X.*(1+2*Y) ; v = Y ; streamslice(X,Y,u,v)

18 giorni ago | 0

Answered
I am supposed to use a for loop to create 𝑥-values and compute 𝑓(𝑥) values for the function
f = @(x) x.^2 ; m = 100; x = linspace(0,10,m) ; y = zeros(1,m) ; for i = 1:m y(i) = f(x(i)) ; end plot(x,y)

18 giorni ago | 0

Answered
How to export a double matrix into csv
Read about csvwrite, writetable

19 giorni ago | 0

| accepted

Answered
Index in position 1 exceeds array bounds. Error in dt (line 41) del(i,N) = del(i,N-i);
This error occurs, when you try to extxract more number of elements than present in the array. % Example A = [1 2] ; A(1) %...

19 giorni ago | 1

Answered
I'd like to extract a timeseries for a 4-D double variable from a .nc file that contains: 1)time, 2)longitude, 3)latitude, 4)depth
As your matrix is 4D....you can read the variable 'var' of your interest in the following way... data = ncread(ncfile,'var',star...

20 giorni ago | 0

Answered
how to write a geometric series in command window
a = 1 ; r = 2 ; n = 0:9 ; gp = a*r.^n

20 giorni ago | 0

Answered
Don't show "NaN" in uitable ,if there not value in a table cell.
You can remove the NaN's using isnan. A = [1 2 NaN 3 4 NaN 5] ; A(isnan(A)) = []

21 giorni ago | 0

Answered
How can I get select rows of a cell?
If all you are numbers why don't use load, importdata, readtable. Also in the textscan, you can get an array, read about cell2...

21 giorni ago | 1

| accepted

Answered
How to make a m*2 matrix into n number of 2x2 matrices
A = rand(208,2) ; [r,c] = size(A); nlay = 104 ; out = permute(reshape(A',[c,r/nlay,nlay]),[2,1,3]);

21 giorni ago | 0

Answered
too many input arguments .
You should show how you are calling the function. Note that, this function takes only one input q which is a 1x2 array. It seems...

21 giorni ago | 0

| accepted

Answered
Generate dll for a c file in matlab
Read about mex

22 giorni ago | 0

Answered
Polyfit matrix from import TXT file
% Import data filename = 'A2Q2_input_a.txt'; T = readtable(filename); x = T.(1) ; y = T.(2) ; % perform linear polyfit fun...

22 giorni ago | 0

Answered
How can I get a license number?
Read about license

23 giorni ago | 0

Answered
Using for loops to determine the largest number in an array.
RandomNumbers = [3, 9, 27, 81, 7, 9, 10, 33, 2, 55]; LargestNumber = RandomNumbers(1); for i = 2:length(RandomNumbers) if Ra...

23 giorni ago | 1

| accepted

Answered
Inserting black lines on pcolor plot
You can use contour. Let X, Y, H be your data of (x,y) coordinates and H be your depth. figure hold on pcolor(X,Y,H) shad...

24 giorni ago | 1

| accepted

Answered
Get one equation from two complex roots
syms s eqn = (s-(-9+1i*3))*(s-(-9-1i*3)) ; simplify(eqn)

26 giorni ago | 0

Answered
Plot points with different brightness
Read about scatter

26 giorni ago | 0

Answered
Find the intersection of two lines with multiple intersections.
You may use this: https://in.mathworks.com/matlabcentral/fileexchange/22441-curve-intersections % Basic Variables k_prime = 1...

26 giorni ago | 0

Answered
To extract the last sub string from strings
expression = '\d+\.?\d*EP'; s = regexp(input,expression,'match') ; s = strrep([s{:}]','EP','') ; s = str2double(s)

26 giorni ago | 0

Answered
How to fix the incorrect shape of a mesh
Refer this: https://in.mathworks.com/matlabcentral/fileexchange/15161-plotcube You need to arrange the vertices in an order......

27 giorni ago | 0

Answered
sketch cone in matlab
t = linspace(0,2*pi,50) ; r = linspace(0,3,50) ; [th r] = meshgrid(t,r) ; x = r.*cos(th) ; y = r.*sin(th) ; z = r ; surf(x...

28 giorni ago | 0

Load more