importing the excel data into matlab in symbolic math tool

조회 수: 3 (최근 30일)
sunitha
sunitha 2021년 1월 15일
답변: sunitha 2021년 1월 16일
i have used symbolic math tool box to find out the variable in the equation. i have imported the data from the excel file to matlab.but i am not getting the result.

답변 (2개)

Walter Roberson
Walter Roberson 2021년 1월 15일
Your X is a vector with four elements. When you use it in the equations you are creating a system of four simultaneous equations. You then ask solve to find a single N value that solves all of the equations simultaneously.
solve() is not vectorized: it is simultaneous solutions only.
  댓글 수: 9
sunitha
sunitha 2021년 1월 16일
Here I am getting the result some what higher compared to manual calculations.and if I change the data, I am getting only one value for four outputs.
Walter Roberson
Walter Roberson 2021년 1월 16일
We do not have your data to test with. We also do not know what your manual calculations came out as.

댓글을 달려면 로그인하십시오.


sunitha
sunitha 2021년 1월 16일
i have written the code for individual data to crosscheck that my getting the correct values or not .
i am attaching my code below and i am sending excel file .can u help me where i did mistake
clear all
close all
syms N
Qo=xlsread('suspended','Sheet1','A3')
R=xlsread('suspended','Sheet1','B3')
No=xlsread('suspended','Sheet1','C3')
X=xlsread('suspended','Sheet1','F3')
V=2434.67
r=(No-N)/No
k=1.076
a=0.27
Solution=solve(0==Qo*(1+R)*(No-N)*r-V*((X*k*N)/(a+N)),N);
vpa(Solution)

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by