Answered
How to obtain the eigenvectors accoding to the eigen values I've obtained? My code is as follows
[V,D] = eig(A) ; In the above V gives you eigen vectors as columns and D is a diagonal amtrix, with diagonal values as eigen v...

6 years ago | 0

Answered
How to perform operation on sepcific elements in an array?
C = zeros(size(A)) ; C(B) = A(B)-2.5

6 years ago | 0

Answered
What would you do without MATLAB?
I am surviving without MATLAB since ten months. If there is no MATLAB there are other alternatives similiar to MATLAB which are ...

6 years ago | 2

Answered
How to change the following code to loop
Two ways to convert your code into a loop. I am assume that you want to run that code multiple times in a loop. Convert your c...

6 years ago | 0

Answered
The code that gives how many values ​​can be divided into 5 in the S array given below while Write with the cycle.
If mod(x,5) is 0 then x is divisble by 5. This also works in array. You can count number of ones using nnz, sum. Read about mo...

6 years ago | 0

Answered
How to select random values that have an upper and lower bounds
A=size(8760,1000); B=size(8760,1) % select a value in each row such that B lies between prctile 95 & 5 % repeat the process n ...

6 years ago | 0

| accepted

Answered
How can we find the pen angle, letter slope, and pen scale of a single alphabet?
Read about imdistline, getpoints, ginput. You can get the points you want, lines you want and you can play with the coordinate...

6 years ago | 0

Answered
Draw a 3D model having x,y and z coordinates
Your coordinates given are not forming a full cylinder. If you join them, you will not get a perfect cylinder as expected. As yo...

6 years ago | 1

| accepted

Answered
Display an RGB image
Convert it into uint or int and use imshow or imagesc.

6 years ago | 0

| accepted

Answered
Make a quiz in matlab
questions = {'How many earth? ' 'Is 7 a prime number? ' 'How much water in glass? ' } ; answers = {...

6 years ago | 0

| accepted

Answered
Volume of stl files
You can read coordinates and nodalconnectivity from .stl file using stlread. To get the volume refer: https://in.mathworks.com...

6 years ago | 1

| accepted

Answered
How to keep some data in the workspace when clear all?
You can delete specific variables using clearvars. You have many other options along with that. Read it here. https://in.mathw...

6 years ago | 1

| accepted

Answered
Reshape matrix (Special case)
A = rand(360,1) ; iwant = reshape(A,3,[])';

6 years ago | 1

| accepted

Answered
Trigonometric Interpolation for even functions.
It is really a simple one. Read about interp1. Say I have given (x,y=f(x)). I want to calculate value of y i.e f(x) at give x ...

6 years ago | 0

Answered
plot angle in a triangle
Refer this: https://in.mathworks.com/matlabcentral/answers/442706-how-to-draw-a-arc-with-arc-length-and-angle

6 years ago | 0

Answered
Longest Run Tosses Matlab
N = 2 ; % [1- heads, 2-tails] toss = 100 ; %number of tossings state = zeros(toss,1) ; for i = 1:toss state(i) = randpe...

6 years ago | 0

Answered
Finding the position of a cell within a Matrix
Read about isnan. idx = isnan(Matrix(:,2)) ; Matrix(idx,:) % To get the rows rows = find(idx)

6 years ago | 1

| accepted

Answered
How can I pick values from one column based on values on other columns
Read about unique. This will give the indices, values which are repeating in the array. If you provide a value (say price) you...

6 years ago | 0

Answered
2D Line Interpolation
data = [36.97 126.5 36.79 126.45 394.94 1.79 36.98 126.4 36.79 126.45 179.59 0.75 37 126.65 36.55 126.64 8...

6 years ago | 0

| accepted

Answered
extract data from a loop
clc clear close all format long mu0=4*pi*10^-7; R=0.9; N=17; I=12.5; Z=-1.5:0.01:1.5; B1 = zeros(size(Z)) ; B2 = zero...

6 years ago | 0

Answered
why interp2 report "input grid is not a valid meshgrid" since input grid is generated by meshgrid?
load("data.mat") ; % original coordinate je=167; ke=117; dy=4e-8; dz=dy; ya=[0:dy:je*dy]; za=[0:dz:ke*dz]; ya=ya-mean(y...

6 years ago | 0

| accepted

Answered
Error in plotting slope and deflection graph
by You need to save slope and deflection inside the loop and plot. Actually you need not to use loop for this. clc; clear ; ...

6 years ago | 0

| accepted

Answered
How to plot a 3d graph with projection of 3d axis values on to the 2d surface with vertical lines
N = 100 ; x = rand(N,1) ; y = rand(N,1) ; z = rand(N,1) ; % pick some points from above to draw vertical lines idx = randpe...

6 years ago | 1

| accepted

Answered
Printing Certain Number from a Vector
disp(vector(vector~=0))

6 years ago | 0

| accepted

Answered
How to plot a graphic 2 d
It is a simple scatter plot and a curve is fit to the data. To achieve the plot read about the following functions: Load data...

6 years ago | 0

| accepted

Answered
Simple plot of time series from excel
Read about readtable, xticks, dateticks.

6 years ago | 0

Answered
Method of subtracting a number from a three-dimensional matrix
Instead of loop, you can do the following: LEt A be your matrix of size 300x16x21. A(:,1,:) = A(:,1,:)-1000 ;

6 years ago | 0

| accepted

Answered
My graph is blank
w = input('Enter weight "W" of aircraft value(kg)'); c_d0 = input('Enter profile drag coefficient "C_d0" of aircraft value'); ...

6 years ago | 0

Answered
If statement doesn't return base case
inp = 1:100 ; result = zeros(size(inp)) ; result(inp<25) = 1 ; result(inp>=25) = abs((log(100./inp(inp(>=25)))/(log(4)))); ...

6 years ago | 0

Answered
Spitting matrix A into other matrices using the last two columns values
A = [1 1 1; 2 1 1; 3 1 1; 4 2 1; 5 2 2; 6 2 2]; rowDist = [2 1 1 2] ; iwant = mat2cell(A,rowDist) ; Access iwant by iw...

6 years ago | 0

Load more