How to assign design variables?

How to assign design variable in matlab coding and call it in mathematical function .
Example:- I have to make a function with variables x and x containing design variable a,b,c,d
And I have to call it in equation in the same function in a way
sigma = 5.04e5./(x(:,3).^2.*x(:,4));
then how to do it.

2 Kommentare

Jan
Jan am 2 Mär. 2022
What are "design variables a,b,c,d"? Do you mean symbolic variables?
Danishtah Quamar
Danishtah Quamar am 7 Mär. 2022
Yes x(1)=a % length
x(2)=b % width
and so on

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Walter Roberson
Walter Roberson am 7 Mär. 2022

0 Stimmen

See matlabFunction option 'vars' with the {} approach
matlabFunction(EXPRESSION, 'vars', {[a, b, c, d] })

Kategorien

Mehr zu Variables finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 2 Mär. 2022

Beantwortet:

am 7 Mär. 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by