Input vector from readxls into a function and plot

조회 수: 1 (최근 30일)
Maximilian Jatzkowski
Maximilian Jatzkowski 2018년 11월 29일
댓글: Maximilian Jatzkowski 2018년 11월 29일
Hi
i Have this function
function Vl=varmelackage(tempU)
tempU=xlsread('temperatur.xlsx','D3290:D3654')
h=24
l=2*10^6
tempIn=22
Vl=(h*l)/(tempIn-tempU)
end
i would now like to both be able to retun all function values corresponding to each value in the table "temperatur.xlsx", and i would also like to plot the function. How do i do this?

답변 (1개)

KSSV
KSSV 2018년 11월 29일
Read about readtable
  댓글 수: 1
Maximilian Jatzkowski
Maximilian Jatzkowski 2018년 11월 29일
but readtable doesnt really help me i think
i would like to be able to plot Vl, but if i run the function, i get a vector with all zeros, even though my input is a long vector of different numbers, and my function is relatively simple
so then the plot of the function using fplot just becomes a straight line along the x-axis...

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

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by