Answered
How will i transfer this graphical method code to simplex method?
clear all; close all; clc; FOS= input(' Enter the value for FOS= '); F= input('Enter Force= '); L= input('Lengt...

8 years ago | 0

| accepted

Answered
Center graph in figure window
figure() subplot(3,1,2) plot(x,y) Or subplot(4,4,[6 11]) plot(x,y)

8 years ago | 0

Answered
how to write this integration please
syms x %requires symbolic toolbox fun=(0.00001*x.^4-0.0003*x.^3+0.0093*x.^2-0.0843*x+0.1721)*(0.154*exp(0.089*((x-9.911...

8 years ago | 0

| accepted

Answered
How to compare three variables
Maybe try: a=1 b=2 X_final = X((Y(:)== a) & (Z(:)==b))

8 years ago | 0

Answered
solve function, getting error
syms Kspp h=6.6262*10^-34; %Planck constant ha=h/(2*pi); %Reduced Planck constant Kb=1.3806*10^-23; % Bo...

8 years ago | 0

Answered
Recieving error Index exceeds the number of array elements (1) when attempting to useODE45?
%SCRIPT FILE: tspan=[0 100]; y0=[5;350]; [t,y]=ode45(@tutorial3,tspan,y0); plot(t,y(:,1),'-or') hold on pl...

8 years ago | 0

| accepted

Answered
Convert data from a 3d residual plot to a matrix?
3_column_matrix = [ x(:) y(:) z(:) ]

8 years ago | 0

Answered
how to access variable from another function
Use *<https://in.mathworks.com/help/matlab/matlab_prog/nested-functions.html nested function>*

8 years ago | 0

Answered
'Cutting off' beginning and end of a matrix
numData(:,1)=[] %chops off 1st column numData(:,end)=[] %chops off last column likewise for rows just interchange the index...

8 years ago | 1

Answered
Improper assignment with rectangular empty matrix ERROR!
[idx,values] = ismember(b,a) %returns values and logical index of b in a index=find(ismember(b,a)) returns linear index ...

8 years ago | 1

| accepted

Answered
how can i display b(i,j) matrix.i have attached the code i am working with.
a=[1,2,3,4;4,3,2,3]; [m,n]=size(a) b = zeros(m,n) % pre-allocate for speed for i=1:m % not , should be ...

8 years ago | 0

| accepted

Answered
Error using reshape To RESHAPE the number of elements must not change.
An example to illustrate: a= rand(4,13) %your vector which needs to be reshaped numel(a) reshape(a,m...

8 years ago | 0

Answered
Getting a Symbolic Variable from the user using input
_"How to get a Symbolic variable as an input from the user?"_ prompt = 'Horizontal force on node: '; str = input(prom...

8 years ago | 0

| accepted

Answered
How to create subplots from a data set by using a function
%%%%%script file datas = load('dx0025_203m.mat') dx = datas(:,1) nx = datas(:,2) %assumption cause you didn't uploa...

8 years ago | 0

Answered
Extract the real part of a function as a symbolic expression
real(funct) %extracts Real part of complex function imag(funct) %extracts Imaginary part of complex function

8 years ago | 1

Answered
Unwanted "ans" in my output
[area,cr]=circle(2) % calling of function with two outputs , here r is 2 function [area, cr] = circle(r); area = pi ...

8 years ago | 1

| accepted

Answered
How to Plot in a For Loop within a function?
*EDITED* data = load('heel_bottom.mat') x = data.heel_bottom.left.X time = data.heel_bottom.Time 'on' size(time) size(...

8 years ago | 0

Answered
For Loop / Sum of Equation
X = zeros(1,100) %preallocation for speed for j = 1:100 %an example X(j) = j; %saves X in each element to avoid o...

8 years ago | 0

Answered
Parse error: usage might be invalid MATLAB syntax
fx=1:10 %an example of the vectors x=10:20 I = trapint(x,fx) function I=trapint(x,fx) N= max(size...

8 years ago | 0

Answered
Finding the average of multiple Matrices on multiple files
An example: folder='E:\Matlab'; filetype='*.xls'; % or xlsx , specify the correct format of your files f=fullfi...

8 years ago | 1

Answered
looking for nonnegative least squares solver
See <https://www.mathworks.com/help/matlab/ref/lsqnonneg.html *lsqnonneg*>

8 years ago | 0

| accepted

Answered
Fitting two arbitrary set of data without tool box
Why don’t use <https://www.mathworks.com/help/matlab/ref/interp1.html *interp1*> with spline method?

8 years ago | 0

Answered
How do I rename a variable, as it changes in a Loop
See <https://www.mathworks.com/matlabcentral/answers/304528-tutorial-why-variables-should-not-be-named-dynamically-eval>

8 years ago | 1

Answered
The way to get a graph in case of discretized system
I managed to store the values of t and T but the loop plot seems to be frustrating: t(1) = 0 ; % T=zeros(1,100...

8 years ago | 0

| accepted

Answered
How do I import/load multiple files from folder in MATLAB?
see <https://in.mathworks.com/help/releases/R2013a/matlab/import_export/process-a-sequence-of-files.html *processing sequence of...

8 years ago | 0

| accepted

Answered
How can I divide the rows of an unknown size matrix into quarters?
if I interpret your question correctly: function [answer1,answer2,answer3]=(A,B,C,D) answer1=[A*A;A*B,A*C,A*D]; ...

8 years ago | 0

| accepted

Answered
Converting fractions to decimals in exponents of symbolic expressions
maybe like this: syms x a=sym('3.7') f=sym((2*x.^(a))) digits(20) a=vpa(diff(f,x))

8 years ago | 1

| accepted

Answered
Hi there! I'm just starting with matlab, so this question may seem a little too easy.
x=1:10; Vector = myfunction(x); function Vector = myfunction(x) disp('x = ') disp(x) ...

8 years ago | 0

Answered
How can i plot 1 variable in x and 3 in y for a 2 D plot
[num,~,~] = xlsread('steering_angle.xlsx') %use function syntax properly plot(Steeringangle,Geschwindigkeit,'b') hold on ...

8 years ago | 1

| accepted

Load more