답변 있음
How do I change color diffusion in jet colormap?
%% Example data x = (2:-0.1:0); data = sin(x); %% Shift the values towards the center, so you get a circle instead of an annu...

4년 초과 전 | 2

답변 있음
How do i define a variable as a function?
syms theta(t) f=cos(theta(t)); diff(f,t)

4년 초과 전 | 0

답변 있음
Search a given row array in a matrix and get position
A=[0 0 0 0 0 0 0 0 0 178 0 0 0 0 0; 1 2 5 3 2 4 178 5 6 2 2 2 2 2 2; 0 2 178 178 178 178 178 178 178 178 178 0 2 3 2]; ch = o...

4년 초과 전 | 0

| 수락됨

답변 있음
Converting a matrix to string
X = rand(3,3); Y = rand(3,3); Z = rand(3,3); figure plot(X,Y,'.') text(X(:),Y(:),num2str(Z(:)))

4년 초과 전 | 0

| 수락됨

답변 있음
How to rearrange a column by a specific order?
How about using sort? s = [{'Done' } {'verify' } {'Done' } {'backlog' } {'verify' } {'verify' }] ; s = sort(s) ...

4년 초과 전 | 0

답변 있음
How to plot multiple 2D matrix data with different color on the same figure?
I = rand(100,100,10) ; [m,n,p] = size(I) ; [Y,Z] = meshgrid(1:n,1:n) ; X = ones(m,n) ; figure hold on for i = 1:p s...

4년 초과 전 | 1

답변 있음
how to merge two NetCDF4 files into one
file1 = 'tropomi1.nc' ; file2 = 'tropomi2.nc' ; x1 = ncread(file1,'/PRODUCT/longitude'); y1 = ncread(file1,'/PRODUCT/latitu...

4년 초과 전 | 1

| 수락됨

답변 있음
Running an inner loop multiple times.
You may proceed something like shown. Check your code and values once, t is coming as inf. This should give you some idea. numb...

4년 초과 전 | 0

| 수락됨

답변 있음
Finding a specific value after analysing the trend of different plots
Read about interp1. You can use this to extract the values you want. Let (x,y) be your data and you want yi for xi: yi = inte...

4년 초과 전 | 0

답변 있음
how to animate Plot
This should help you: https://in.mathworks.com/matlabcentral/answers/94495-how-can-i-create-animated-gif-images-in-matlab

4년 초과 전 | 0

답변 있음
How to import data from a txt file that has 256 arrays and 128 data points per array into a 128x256 matrix?
filename = 'SeqLoop.data.kSpaceOS.txt' ; fid = fopen(filename,'r') ; S = textscan(fid,'%s','delimiter','\n') ; fclose(fid)...

4년 초과 전 | 1

| 수락됨

답변 있음
I need to create matrix without using loops
Read about the function diff, gradient.

4년 초과 전 | 0

답변 있음
I have noisy image matrix.I need to plot it on line plot.How do I do it?
You can convert image into column using (:). But I don't think this is the way to check. I = imread('cameraman.tif') ; plot(...

4년 초과 전 | 0

답변 있음
Creating Surface Plot from a Matrix with 3 Columns
x = speed ; y = Torque ; z = bsfc ; %%structured xi = unique(x) ; yi = unique(y) ; [X,Y] = meshgrid(xi,yi) ; Z = reshape(z,...

4년 초과 전 | 2

답변 있음
Add next and previous business date of each date in array row
d = datetime('today') d0 = d-day(1) d1 = d+day(1)

4년 초과 전 | 0

답변 있음
Unable to perform assignment because the indices on the left side are not compatible with the size of the right side.
Your LHS is a single elememnt and RHS is a 1x2 matrix, which cannot be saved. May be you want this? a=[0.3; 0.7]; x0=[1; 1];...

4년 초과 전 | 0

| 수락됨

답변 있음
Having error "Can't define variable t"
Why do you want to reinstall MATLAB? You are not running the function/ code properly. Copy your code in a single file, make it a...

4년 초과 전 | 0

| 수락됨

답변 있음
Exporting mesh generated by MATLAB to ASCII file?
Have a look on the model. model.Mesh In the above you have elements as well as nodal connectivity. You can pick from there and...

4년 초과 전 | 1

| 수락됨

답변 있음
How to remove start and endpoint line?
Introduce NaN at the end of the line.

4년 초과 전 | 0

답변 있음
Why am I getting: "invalid syntax at "(" .A might be missing a closing ")"
You are missing an operator, multiplication operator at many places. (cos^2*( .. %underneath

4년 초과 전 | 0

답변 있음
How do I plot a contour plot using my data?
Your input is a 3D matrix. contourf needs 2D matrix to plot contours. Input a 2D matrix. for i = 1:size(data_mat_ac_removed,3)...

4년 초과 전 | 0

답변 있음
Output vector from structure
[driver(:).status]

4년 초과 전 | 0

| 수락됨

답변 있음
Accessing multiple folders and extracting specific image files
https://in.mathworks.com/matlabcentral/answers/401335-how-to-access-text-files-from-many-subfolders-within-a-folder https://in...

4년 초과 전 | 0

답변 있음
How do I draw a graph using a for if statement?
x = 0:0.01:30 ; y = zeros(size(x)) ; y(x<0) = 5 ; idx = 0 >= x & x <10 ; y(idx) = 5*x(idx)+5 ; y(x >= 10) = 5*sqrt(...

4년 초과 전 | 0

답변 있음
How its possible do define this function in Matlab?
function g = func(t) if t >=0 && t < 1 g = t+1 ; elseif t >= 1 && t < 2 g = 0 ; elseif t >= 2 && t < 3 g = 2-t...

4년 초과 전 | 1

답변 있음
Vectorize nested for loops
You can reshape the matrices and get what you want. But note that, C will be over written when i-index changes. You may procee...

4년 초과 전 | 0

답변 있음
Hi . what is the difference between numel() and length() of a given vector ?
numel gives you total number of elements present in the array. i.e. it is product of result of size function. A = rand(10,3) ;...

4년 초과 전 | 4

| 수락됨

답변 있음
How to off the axis in eye diagram and save as image?
set(get(gcf, 'Children'), 'Visible', 'off')

4년 초과 전 | 0

| 수락됨

답변 있음
How to read tab delimited .txt file line by line (File attached)?
fid = fopen('Data.txt'); tline = fgetl(fid); while ischar(tline) disp(tline) tline = fgetl(fid); end fclose(fid);

4년 초과 전 | 1

답변 있음
Add two rows in a matrix with new datas
E = pascal(10) ; iwant = [E ; mean(E) ; std(E)]

4년 초과 전 | 0

더 보기